From patchwork Tue Feb 14 21:12:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 57200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3203535wrn; Tue, 14 Feb 2023 13:15:39 -0800 (PST) X-Google-Smtp-Source: AK7set8esiwwnUauiNlyCWybdXJr5w4KfIMVOxC/6u8oJBmmf5BhjwcH59V9TnbMLx4SBiHwaseI X-Received: by 2002:a17:906:6b91:b0:87d:f29:3a16 with SMTP id l17-20020a1709066b9100b0087d0f293a16mr3565368ejr.34.1676409339118; Tue, 14 Feb 2023 13:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676409339; cv=none; d=google.com; s=arc-20160816; b=FVceOQ9F86Dw9ywehynL0SPtF/RIzutpa2xv6nCJ4Ipo9mfgHcNFPevgSVeR5WjpRq 3bqIIGhIyB3PjczQF1oAssPSfoUXDs0hTM2KOD0UIqnOdiA4jJlpDJfOD1S5gIZQtDY4 YB3BhhB3ho66+B063b0sRyCPdpQRvXy7oHnPZFUNhELCp+YUXJLiUWV0WLs0bXvNmdfJ PNDScTbNXef2DjAWdRt/+HZ+WdjefB3WdM6sal3ZcivZE6I/iHRew2lCDBmbwxXqWumv cnFEU1aMyD+g1iMcvPuTo6UWBIlQbkRXi1j1ldWeAllKgSMB+7M16NMqPvY6G8iis1id fuHQ== 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=BpczvFjXIF4w89r5EuSkN2NIsV/HuXG62UUKR5Nps4Q=; b=oh1coEo+iVvpWWvdD3se9oTw1TyDeH65mfhhxLokAZq+bYuZSjqMZDaT3KMG9Gwjoo EtgOFw+u7bS+iVGbZaQpPA+On8wk/Ld+oZwInf/VvXoVryyhi6iRxr4pz1DlXIiHTadJ fwa/JL4LhuqUyVfotcuARsqu43fXbu+KtQWSiFn2eT05iJTOMrIxxPCJw4zDzzmQGHD8 1t/ASjt5Oiv6LylupRonCYEx+2hbd3XRpFyvWRr7dapHPSAxabk1Re2rjFVuTBXp1y7D XkR6zYTQYgv3+4jgKylKAlbigFCXt2UnETDUuCsecWjY8s3//bvv0ayG17rQ/7+iSQGR bHcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Isw2wOmx; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id up27-20020a170907cc9b00b008b13468ac5asi2187955ejc.204.2023.02.14.13.15.15; Tue, 14 Feb 2023 13:15:39 -0800 (PST) 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=Isw2wOmx; 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 S232353AbjBNVNy (ORCPT + 99 others); Tue, 14 Feb 2023 16:13:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232169AbjBNVNq (ORCPT ); Tue, 14 Feb 2023 16:13:46 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD4EE2CFEF; Tue, 14 Feb 2023 13:13:41 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31EIohiQ023146; Tue, 14 Feb 2023 21:13:25 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=BpczvFjXIF4w89r5EuSkN2NIsV/HuXG62UUKR5Nps4Q=; b=Isw2wOmxQZqFdcB9nXyDW/ZNv0oJ813sRIVPxqb73QKWDZZa32/6bcYTAQliU75UYh2N OGatPrAMjQIibY9e5RAGr1mvgKcp4c0rhENAQUaYH0Wwtp7NBofKwSO0b1w9G5roS+xf ozROeU0DSxwbjYnxNaymejP8uEupl63TUcVRm2H9g3qkbafxYDH6uIQwRFhCRjnhppiJ nTjs+TCMoGX5ILh6Dd+nx9a4zTz/COBQL++xucuT9E6jJlsZuOwBdoC0bM69s9+IQluA plwyz5T/pBvUcbAlTfazaBxf5LFEyT8vqLpCSduQ5NP3AMbeqcq6FXUf1ebKl3ADJE0y fA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nr6qkhwsy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Feb 2023 21:13:24 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 31ELDNRt018557 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Feb 2023 21:13:23 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.36; Tue, 14 Feb 2023 13:13:22 -0800 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 , Catalin Marinas , Jassi Brar , , , , , , Rob Herring Subject: [PATCH v10 02/26] dt-bindings: Add binding for gunyah hypervisor Date: Tue, 14 Feb 2023 13:12:05 -0800 Message-ID: <20230214211229.3239350-3-quic_eberman@quicinc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230214211229.3239350-1-quic_eberman@quicinc.com> References: <20230214211229.3239350-1-quic_eberman@quicinc.com> MIME-Version: 1.0 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-GUID: Z8eJEK1iRqVXd-3h3zgfI0JNLWIRSa9w X-Proofpoint-ORIG-GUID: Z8eJEK1iRqVXd-3h3zgfI0JNLWIRSa9w X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-14_15,2023-02-14_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 clxscore=1015 bulkscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 mlxscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302140183 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757842599446651393?= X-GMAIL-MSGID: =?utf-8?q?1757842599446651393?= 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 */ + }; + };