From patchwork Thu Feb 22 23:16:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 13568227 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 F2FB0C47DD9 for ; Thu, 22 Feb 2024 23:16:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C03E6B0083; Thu, 22 Feb 2024 18:16:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FE866B0088; Thu, 22 Feb 2024 18:16:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EC226B0085; Thu, 22 Feb 2024 18:16:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id F08766B0082 for ; Thu, 22 Feb 2024 18:16:41 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id CC1E940FB9 for ; Thu, 22 Feb 2024 23:16:41 +0000 (UTC) X-FDA: 81821001402.26.1028D89 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf02.hostedemail.com (Postfix) with ESMTP id B07468000D for ; Thu, 22 Feb 2024 23:16:39 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=jpuNQvcn; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf02.hostedemail.com: domain of quic_eberman@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_eberman@quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708643799; 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=oWnghs7sEsHkez39tQquVTv8CCRTmJHz664b/mA4aIY=; b=h+XKXypD5bd+RWjub2Hfp+RXg85YfhvdBvq7gmMZLB/H9FuBmmRU9VZYiiNvnkP65mTLqq M7BZhXjaGRVw/QcfiPktyL9Wg0B4Eam8Tc6iHJ7NsypEquvvjqB/Sumom6dwyLoF69ANcF HuZX3DODyycRHkuIdsfxgSm9hCI+Hl0= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=jpuNQvcn; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf02.hostedemail.com: domain of quic_eberman@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_eberman@quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708643799; a=rsa-sha256; cv=none; b=i7IczvyhFkZMOTzWWXot3UCYuq1jsoxLpoRvrDAuLoT07kHCQqXAiiiX1wZXeCQjP2pbpO xyJJnQUZ4OPcOCz74mG7uJPM4okJa7Y2lE/J2hg0ffeTutl6F6UUqaut6R8kxshtyiN/Yi bMgXXF1PlHnyl6pNO9R14fFwSWwkgD0= Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41MLm2Yd008649; Thu, 22 Feb 2024 23:16:30 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=oWnghs7sEsHkez39tQquVTv8CCRTmJHz664b/mA4aIY =; b=jpuNQvcnyJPwtVHp8e4pknykV3AH0Tq+yWjN+KZYz2iTOLpEOQ0QfV7wK9w U4AyUZce+Z8u/xR0LXfb4x2fASPNWSyomWv+txCrJr3mh8A8YVX5+Atk30WkvGKo bnC9nC85oV/2MdEguoI24gZ2Vfuzp6c2nOciqqp39wW8Mj1tqjdOwBLjc2aTZtL3 0SemDeNxUTWzxwwwnViXfKmpTmikWsTpxldC379ttWND9mSvdjbje3PISsaHDM55 L2y+hpsCkSjly9x3QQd/VTdUGMFf5PVhUJoBiHMT0xMDnRO+f+DpL/JalTXfVCgF 36IQg4UnCpXkb8c8o48UvwkbDVA== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wdw13afvf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 23:16:29 +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 41MNGS2D017417 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 23:16:28 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; Thu, 22 Feb 2024 15:16:27 -0800 From: Elliot Berman Date: Thu, 22 Feb 2024 15:16:25 -0800 Subject: [PATCH v17 02/35] dt-bindings: Add binding for gunyah hypervisor MIME-Version: 1.0 Message-ID: <20240222-gunyah-v17-2-1e9da6763d38@quicinc.com> References: <20240222-gunyah-v17-0-1e9da6763d38@quicinc.com> In-Reply-To: <20240222-gunyah-v17-0-1e9da6763d38@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.12.4 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-ORIG-GUID: B4jDgrHxuxRwopWHvIyZDMwv1ZmQ6FLi X-Proofpoint-GUID: B4jDgrHxuxRwopWHvIyZDMwv1ZmQ6FLi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_15,2024-02-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 impostorscore=0 bulkscore=0 adultscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 priorityscore=1501 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402220179 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: B07468000D X-Stat-Signature: zmhfpc7356gmfwfq1u5bbhugp1kppqoc X-HE-Tag: 1708643799-989961 X-HE-Meta: U2FsdGVkX1+GZ4TDPDy/5Gy1KY7468xjRTdPY+XKaguOD8rfX1bttN8594C8n1NCWNmheqnfN2c24KPa7VJpGWtUtrJoacSO/ihW/W/124kTmDE3e6R8WPMQRBrsg8D25hzseQz7dP8426pYt7CcwJvFj7q1HNoT49tZNamSl/zA5hBj3jyv3Qk0vil27RuKByvFhZFgIx1GsGxAxv6TNwhqCL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DoHDgHkMnPE6JLpjutrPeZWaflPT6cAdSY2bxyPQFeNKZSfRCmHdqSK+wllWMUS53tV/3xOZZVFE+Hd3OlWCozw8iUPA2M1yKHRkrMnsHOoB6XpJRSivuGqAls2UHQxfXj6G+xT605xqyzBfTi3Ii3skVbzGfpSkHDtB3GbyjscpQPWNmS3quJCYAhoGUSmhBTpH4POwY2mvTh49dld4qPFgTWpU= 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 0000000000000..cdeb4885a8072 --- /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 */ + }; + };