Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6228745rwr; Mon, 24 Apr 2023 16:18:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5iz6pCOLYdH3hB2EROPu4IXotrEVZPPJ4n/NxhsBbSTFJ2YfUjMmMI7Aj7c4aEY7SXB7qf X-Received: by 2002:a17:90a:883:b0:24b:cad3:afb8 with SMTP id v3-20020a17090a088300b0024bcad3afb8mr2637035pjc.23.1682378283603; Mon, 24 Apr 2023 16:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682378283; cv=none; d=google.com; s=arc-20160816; b=CgScIk+xWpbd0ULeqRfBuS7WL+p6aU/6L9IUI4K027wcyMqWTT+TJI9WUtG4BWXw7F KOx0+r17PCUGDQXFK/2LUoKWG+LvBzzSrcNNtjvavmQzOANK3Ft1WLZnC/nlN6QEGFOQ 0zrRDXdlPRLjAKJCzDwRn6jPwz/R54jtXE3xYTvF1YKUfTQZh7uH+PQaXSewc6i+Per+ 2r7jjCpE9X1IFqjTlGnklvVqYjaFzAC0M/Zs+/OJck3M75F/XwqU8kfQxJPscZySOAz+ PbVuqTalgoqWZLBcm48dZ/bJMyofUaspyqFkPsoA3vXDCPB5w4dl2a1OTkvfe+wjrXyL t0yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5QXiIZDaSjGFz7nzDMpNq7ZeckSQNExYdJSEF3qZMS4=; b=hns+/76TA4NU8u6A4CtOwhewZGSFHQhGLUTpKf4JJG2LMzd3cVOdysD2yecOiq6nbe TsMymV1fCI5AjiXtNYzqF1nR9zMOTlqOq4fzqvselSq6Uy7R8Qcr6cRDrk8YS333NeJn dkgNr9FqTH5rt6KxJaZEmb4fP92fORBQtp0IyvDncjTYwtAK/KQVITVBB+HRGFmu92am nWYIqvly8XwAaNfeOGlK7JAmtZ95SI0Wy1VMAG+pV/81Q4EtgZL7Oi2P8ejN7fdK8Mkm Yqwa3d+B3kRBdyA74bJ0kakodWgq/abXD4IthqdMJB5CtpA5JvussDgqWe1geXwc1fXW Ewdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iWYJ6Q7I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w191-20020a6382c8000000b0051b3ea27f98si13040782pgd.629.2023.04.24.16.17.48; Mon, 24 Apr 2023 16:18:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iWYJ6Q7I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233108AbjDXXQz (ORCPT + 99 others); Mon, 24 Apr 2023 19:16:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233025AbjDXXQr (ORCPT ); Mon, 24 Apr 2023 19:16:47 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E65CDA5F1; Mon, 24 Apr 2023 16:16:44 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33OLIVoD006447; Mon, 24 Apr 2023 23:16:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=5QXiIZDaSjGFz7nzDMpNq7ZeckSQNExYdJSEF3qZMS4=; b=iWYJ6Q7Iy1RHUYeE0e6wuEvZxSOBJAwgsK5I9imfrXKURqap1IIjIkYev/kmnlNF+Uy6 vcrRmDSBoligN7uLKx8Nybr1LmDlt7lqZ7y+xxb7L60uXLpjmy+q3SoHVxNwEFODz5sm Y+BLCJRrPwmG5RaB4CK7M5OJe0UE3Z191y+58CoJ/fIf4BvWkF8G4/nFSDnDYS9vxd3l w1VA16RCujSQBzA39mECbB4H/ViFSFLAylMlYNXEH1Dqup4kVBzdFYCrOg/zCbnOa2TQ 6bmGzuqOplthYGJMFdlNSorrvIrsIlDoMdujBWKJcNWnx3SjdQBHqjGVOaPkRUg/k9du hA== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q61jdr5kb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Apr 2023 23:16:30 +0000 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 33ONGTvq029739 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Apr 2023 23:16:29 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.986.42; Mon, 24 Apr 2023 16:16:28 -0700 From: Elliot Berman To: Alex Elder , Srinivas Kandagatla , Elliot Berman , Prakruthi Deepak Heragu , Rob Herring , Krzysztof Kozlowski CC: Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Dmitry Baryshkov , Bjorn Andersson , "Konrad Dybcio" , Arnd Bergmann , "Greg Kroah-Hartman" , Jonathan Corbet , Bagas Sanjaya , Will Deacon , "Andy Gross" , Catalin Marinas , "Jassi Brar" , , , , , , "Rob Herring" Subject: [PATCH v12 02/25] dt-bindings: Add binding for gunyah hypervisor Date: Mon, 24 Apr 2023 16:15:35 -0700 Message-ID: <20230424231558.70911-3-quic_eberman@quicinc.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230424231558.70911-1-quic_eberman@quicinc.com> References: <20230424231558.70911-1-quic_eberman@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) 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: F637mwPPTNhURx6AnrUIykColEcm5C1k X-Proofpoint-GUID: F637mwPPTNhURx6AnrUIykColEcm5C1k X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-24_11,2023-04-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 clxscore=1015 mlxlogscore=999 malwarescore=0 phishscore=0 adultscore=0 mlxscore=0 suspectscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304240211 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When Linux is booted as a guest under the Gunyah hypervisor, 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(+) create mode 100644 Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml diff --git a/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml b/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml new file mode 100644 index 000000000000..3fc0b043ac3c --- /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 full IRQ */ + ; /* RX empty IRQ */ + reg = <0x00000000 0x00000000>, <0x00000000 0x00000001>; + /* TX, RX cap ids */ + }; + }; -- 2.40.0