From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08E0DC7EE32 for ; Mon, 5 Jun 2023 19:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject:From: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O1CEhnpdsRWBoNu8UCxSAsxQB8EcwtdSWkMKwsWToec=; b=I6CfU6NCWUeIp6 he1QNVGIKBmZe4sIwiKJ5furXwNZ7/CXmH8dyNqexOdBuZl6gs/ZxPOMn6k4UnGRjtJRhU/tVH0tL dfU3C6+/stvpmlsMKQlzGZobByCv/wKU8GeJ6hhPYuT9O+0h8he+Uccqk1nWjnmpLzKbO7nriHCWZ hcnF4O3zQAVcbS5ulvjRi7UXA5Hqrjefr0UldJMJUiOl+Lu8ASQp5X4vArn01Pgp0iHg0zUdmWn1i TDhwC+5Sqz2/jvp3nPuEgLUqGfiTLnmlJvEm9U8gE1JgaGKcOv4w0STWobTvM/deAy4/vwogdg39b QrR58TkbV8M18rli0L6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6GAl-00GagZ-0w; Mon, 05 Jun 2023 19:47:23 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6GAi-00GafO-0h for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2023 19:47:22 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-777b4c9e341so61720739f.0 for ; Mon, 05 Jun 2023 12:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685994438; x=1688586438; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=K+K6g914agxSzdAPlI+h0RmOBH1n0CtAnyZzQVNjIUM=; b=LGPCz9DvKsyT9C8LZ9HHpOOrT9bXarBQQ+BVreynXf2mlZl2hNRCwGBsNlryPGc8Pj xpPDisLUTr2xtZgpybZjPFeBUdorJMXrAConsuhsjfWzExoSIn1TCIe87jfJQHKt40h0 fWIB1MgHX78h5bxP1DvOh3li1dehPTwfeCoC7LjYMibTSGlHZadmzJV+VmrZ2pedViBE hwFqL+IHqxzpFWvp+ajunZH7d40P5DXlpE+K44PApHpL51fi7Cv9mkjXYJwIvOqy4QG8 rFSKoMoe5kAubUNzxGQX6HyhT+rSuaLwOD9lVPV2Nrzr00L3oROWkf7o4XNXddpuqIjb gIsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685994438; x=1688586438; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K+K6g914agxSzdAPlI+h0RmOBH1n0CtAnyZzQVNjIUM=; b=P7r2Hq1FZt7UzzOT4BPjg3wwajyS9+uHZv8nXtEJ7Dq02NwkDigD9gLQGqefL8wN4j osOcABr+HXCkZN75JY5ePybUGVLWCN6Hi2mjzAa8ctg61kIkqQxXOVADvNWMJeJcBmoW GsP3FSXK3d9v18DsCauRIYAGmwTzqelwA8CTM68nCJ8icSwYkZlvaUwK+kUy8PnPkNpY jKJPasGnhEnBEUBTjAVmwwPF/I148RRgYzC0EQneD1OvULr+rivg7cPki6Mf+vHasrX8 nLwvZ2aXSjMPAsPzdKXzEeArURoW+4dwrKEQYyuNzggP2HIp7rer9S9zoyHfvO1zBOEe QjKw== X-Gm-Message-State: AC+VfDyQuS7HUWobdWKNCEnCCQP67SA4Lau1jnZgUo8B3y6Zd4f+B+va ijSGHqNrYGCmeNM3zF23DnVCwg== X-Google-Smtp-Source: ACHHUZ5SoD1YOSrw3jMzia5Q4kjhwaSzD+xdYs4pIbAN8BkuqCkgDEzo0mvuY5RckZGzss9s1JBa2g== X-Received: by 2002:a6b:5909:0:b0:778:735c:9bed with SMTP id n9-20020a6b5909000000b00778735c9bedmr266718iob.0.1685994438313; Mon, 05 Jun 2023 12:47:18 -0700 (PDT) Received: from [172.22.22.28] ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id g17-20020a05663811d100b0040fd1340997sm2408770jas.140.2023.06.05.12.47.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jun 2023 12:47:18 -0700 (PDT) Message-ID: <8ec23850-77af-7194-61dd-c3c1bf10ea00@linaro.org> Date: Mon, 5 Jun 2023 14:47:16 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 From: Alex Elder Subject: Re: [PATCH v13 01/24] dt-bindings: Add binding for gunyah hypervisor To: Elliot Berman , Srinivas Kandagatla , 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 , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring References: <20230509204801.2824351-1-quic_eberman@quicinc.com> <20230509204801.2824351-2-quic_eberman@quicinc.com> Content-Language: en-US In-Reply-To: <20230509204801.2824351-2-quic_eberman@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_124720_260562_A5E676B3 X-CRM114-Status: GOOD ( 28.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/9/23 3:47 PM, Elliot Berman wrote: > 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 Rob has reviewed this so I presume it's fine, but I wonder why there's no "qcom," prefix on the compatible strings. It also seems like there might be more bindings to define for Gunyah. See a few more comments below. -Alex > --- > .../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 Looking at dto_create_msg_queue() at the above link, it seems that Gunyah message queues and capabilities get represented in DTS, but I don't see those things documented in bindings. I might be misinterpreting that code, but if not, should these other things be documented as well? > + > +properties: > + compatible: > + const: gunyah-hypervisor Should this be qcom,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 Here too, should this be qcom,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 */ > + }; > + }; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel