From patchwork Tue Jan 9 19:37:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 13515269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC89DC4707B for ; Tue, 9 Jan 2024 19:38:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 650686B009E; Tue, 9 Jan 2024 14:38:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 600EF6B00A0; Tue, 9 Jan 2024 14:38:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A0706B00A1; Tue, 9 Jan 2024 14:38:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3BB676B009E for ; Tue, 9 Jan 2024 14:38:03 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0549640980 for ; Tue, 9 Jan 2024 19:38:03 +0000 (UTC) X-FDA: 81660783246.13.3C6FDF7 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf18.hostedemail.com (Postfix) with ESMTP id E35841C0003 for ; Tue, 9 Jan 2024 19:37:59 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=YO5qyhSi; spf=pass (imf18.hostedemail.com: domain of quic_eberman@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_eberman@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1704829080; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lLDuUBmGZvNBtcKj7wbGM3D9GD/JTPUN1398mSvaVtA=; b=l4CHTC7mGm/uUn7m/uL3Yc9KWY29agTj6OWRAD2rcp7a4sa3CIIRLN7kE8X77pYL4tc2Fa 2cj6f/dopF+0a2uSKWR0les/z/6GYlXp24jFCOzStwGQ8Nmbp72FObULZUstqTk/rGk35x 9/8f2SoTJ3ARTX5++j1nz0pL7aZqwKs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704829080; a=rsa-sha256; cv=none; b=vDNbjebu9DCv+Povp8Kj1sK1Itrovto+CA/xIo1T93Mvv8ke5F0ZQ1bMuKy5ntKxkWabVp vrVcriJKa94sfKDdwqrtFr3QCcQhWqeYsw/DgqHPIzUU3oarujsqPcZ6U9acW5V50lsiOo J63bcDqW4TB9XIGg+vjFQWLIMkW6biU= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=YO5qyhSi; spf=pass (imf18.hostedemail.com: domain of quic_eberman@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_eberman@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 409GcW81031587; Tue, 9 Jan 2024 19:37:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=lLDuUBmGZvNBtcKj7wbGM3D9GD/JTPUN1398mSvaVtA =; b=YO5qyhSisJBy7bUqFg0nkNPGfLRzIKbQDeG9MAPPgqUiW7vKHtIwoENkQz2 n5fu5lqjw3x4/m5OoeWWfpmerLUdwOdjXirXdP16JIIZcl5x6a69s7mA0uVddIIL 6DTzU7lGUQA3QjNW4ChDZJd6pJlHtSNCGUtqo7qnTVtD4je0UxIgOdqnubX7xGpU XuzYTmG1CXX2jBxT+XnqPED7YjyavmNlqCMphduUcLs/B+vgUJk48RLtnlm1wMZF mJ/Jh3vEXQ24EF/Hh92nd/k4ozvX86tJtyxHoxOJkpd9h9plP0UMub3Lr+2pTBGI V8UM6u4tT7zdgewLdsE7sMmCpYQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vh9u9gdbv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Jan 2024 19:37:51 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 409Jbot3011357 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 Jan 2024 19:37:50 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 9 Jan 2024 11:37:49 -0800 From: Elliot Berman Date: Tue, 9 Jan 2024 11:37:40 -0800 Subject: [PATCH v16 02/34] dt-bindings: Add binding for gunyah hypervisor MIME-Version: 1.0 Message-ID: <20240109-gunyah-v16-2-634904bf4ce9@quicinc.com> References: <20240109-gunyah-v16-0-634904bf4ce9@quicinc.com> In-Reply-To: <20240109-gunyah-v16-0-634904bf4ce9@quicinc.com> To: Alex Elder , Srinivas Kandagatla , Murali Nalajal , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Philip Derrin , Prakruthi Deepak Heragu , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Konrad Dybcio , Bjorn Andersson , Dmitry Baryshkov , "Fuad Tabba" , Sean Christopherson , "Andrew Morton" CC: , , , , , , Elliot Berman , Rob Herring X-Mailer: b4 0.13-dev X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: edcD4wUb0AIlamWiAts9LXox64A9mtS0 X-Proofpoint-ORIG-GUID: edcD4wUb0AIlamWiAts9LXox64A9mtS0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 bulkscore=0 adultscore=0 suspectscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401090158 X-Stat-Signature: cieabdtj1p9egoejp5ruedpoywszqtjs X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E35841C0003 X-Rspam-User: X-HE-Tag: 1704829079-4832 X-HE-Meta: U2FsdGVkX1/9k2R+kF3l1VUcrEdyfCMB/Bfl0WbC2zC4qqAU6gTaL0UA32qDODUysGxEgGAjGT0MIFfUjibUu5SaXn5Cm1C3XZCNQVcgaUuRn5wSfgj+BPdkriOtKXWaCimJPpZpJXIIX0oNRhPmA0Wv5XJNi8HA5pTq2fa+1fKZWeMsfbJHtoxBkyhcC6XdDwm9yA6M9xEOX1enNbpMBcWMA0xWN6dmwwAC4/Iv5sqtpBNTp1h9wHfomFCDVXLz5x2E8VRCBIheKDIUC1n+h6gcO0BNtJQG0xAgVh3WtreLZiy4GpK1kjKpti9BefusEU7HcZpCFlNdAXr+SaEPWBfYzf30y/XxvW04O/CSYUkEOaar7gzfxAsQyaoZFQk/zFVM+z5Y+HwE3Un471kaN4N5mXi8uAvkIIKoyChXT5mvb3WrG5zT5hoyOdKOI097hY/dnWd+nUKKqppOaHaEh6Z3IDKHvL/uPbVHWpV2d+56tH79YwEUmkYawEe37t3GE04c48Byra8Z9qaIGfiK4WBuP6lDEM5a84wkJZy63X4OoeumvhWHx9rHwXgMqlgfCyusY41Frm/Dt7bdhSYG8YkDwikTMFpUYBeZy5jAtMqWx7V/3YEo0WEFntI4wsLRBPrWhsBSeuX7pQVF1OiL/H2veRGxvXdL7Zhu9NZDdT/0V4M2H8Dj1+8WlzOiiGnQiOJ2uTOi27pgoPeGGsXQ7vU5JxzPEZhpKKdMFPKOIf98mITtR2zcXKRZKYVOmS0Ej0XRgbThHqM8n1hwmtyeJD5Gu0teCa+PGrc+BeBZtqNw32dbmX7Av6YMlBfgS5vsx3nr1hvO2el+XpmjQ+yO6X+XcTS6aJVdKqP1ZehDccPyq7NiMveTY/ZlGufYOU17yFjvvjwJbDJzn0dMdUhQG4ObNX0IZiZOa3RssWgsLBIu3anz9xNJ9pdBW1ecZYqsm8PHpJR3I8s= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The Gunyah Resource Manager applies a devicetree overlay describing the virtual platform configuration of the guest VM, such as the message queue capability IDs for communicating with the Resource Manager. This information is not otherwise discoverable by a VM: the Gunyah hypervisor core does not provide a direct interface to discover capability IDs nor a way to communicate with RM without having already known the corresponding message queue capability ID. Add the DT bindings that Gunyah adheres for the hypervisor node and message queues. Reviewed-by: Rob Herring Signed-off-by: Elliot Berman --- .../bindings/firmware/gunyah-hypervisor.yaml | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml b/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml new file mode 100644 index 000000000000..cdeb4885a807 --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/firmware/gunyah-hypervisor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Gunyah Hypervisor + +maintainers: + - Prakruthi Deepak Heragu + - Elliot Berman + +description: |+ + Gunyah virtual machines use this information to determine the capability IDs + of the message queues used to communicate with the Gunyah Resource Manager. + See also: https://github.com/quic/gunyah-resource-manager/blob/develop/src/vm_creation/dto_construct.c + +properties: + compatible: + const: gunyah-hypervisor + + "#address-cells": + description: Number of cells needed to represent 64-bit capability IDs. + const: 2 + + "#size-cells": + description: must be 0, because capability IDs are not memory address + ranges and do not have a size. + const: 0 + +patternProperties: + "^gunyah-resource-mgr(@.*)?": + type: object + description: + Resource Manager node which is required to communicate to Resource + Manager VM using Gunyah Message Queues. + + properties: + compatible: + const: gunyah-resource-manager + + reg: + items: + - description: Gunyah capability ID of the TX message queue + - description: Gunyah capability ID of the RX message queue + + interrupts: + items: + - description: Interrupt for the TX message queue + - description: Interrupt for the RX message queue + + additionalProperties: false + + required: + - compatible + - reg + - interrupts + +additionalProperties: false + +required: + - compatible + - "#address-cells" + - "#size-cells" + +examples: + - | + #include + + hypervisor { + #address-cells = <2>; + #size-cells = <0>; + compatible = "gunyah-hypervisor"; + + gunyah-resource-mgr@0 { + compatible = "gunyah-resource-manager"; + interrupts = , /* TX allowed IRQ */ + ; /* RX requested IRQ */ + reg = <0x00000000 0x00000000>, /* TX capability ID */ + <0x00000000 0x00000001>; /* RX capability ID */ + }; + };