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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98B19C77B73 for ; Mon, 5 Jun 2023 19:47:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235835AbjFETr1 (ORCPT ); Mon, 5 Jun 2023 15:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235801AbjFETrU (ORCPT ); Mon, 5 Jun 2023 15:47:20 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1E47F3 for ; Mon, 5 Jun 2023 12:47:18 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-777b4c9e341so61720939f.0 for ; Mon, 05 Jun 2023 12:47:18 -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=Wyz6ELuYTS0x2OIccn22LGKzWLQjO+ny1TDHbiZv7bOJ7/VpN51Ga2JtkLQwX/YFwx 9/ketmZQsjKInbmWjZ22o8/9XL1XkaKpHPfZIEf2JS7R9/6eBaAX/rXqyLVzb8JFq+bW CTRAjT3nm8pGKaKhWgiBYXlggHazjtrEEX/pQZWRVJOGpsOAaAxp7QvHtwe14y1FVu7x yZxbplXlQSXoMolTEu6k2g+zsgeME30HdYuKZbnWBv+l4jJzwY75Y0GPSl8+u1tb4Hkk k1oSahlJp3rWKrHkmyBAiw9ptWRxAO8QHW/Qg1JoWfNPuEz8grEM90L2+WBKxe2ycHhJ BZtQ== X-Gm-Message-State: AC+VfDyzpfF7hFUdqUauxH0stk5AoxpwNXwIT/1o8TBlwP1xdiuVK/O8 tx2k7P9Cz57KAIX2ywSSM+lvBA== 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.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 */ > + }; > + };