Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6114589rwd; Mon, 5 Jun 2023 13:16:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ71ZCouwjW+V4N4PvhOALmXd8cQmpipAwBHzbvM3DOMRZYaYOk7c23T0cFAZ+dX3HuljZuC X-Received: by 2002:ac8:5e13:0:b0:3f4:e9ee:7ae2 with SMTP id h19-20020ac85e13000000b003f4e9ee7ae2mr9820864qtx.63.1685996205177; Mon, 05 Jun 2023 13:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685996205; cv=none; d=google.com; s=arc-20160816; b=DI7qcrZ5FFJSM6aU8kuk17aeVVy5ZScIN0Y87F2lSi1gnV6BISRo8+QL6R2iHPr9HH hC3YOGFb2fr2uCX1YLtbzbQ++gwRgpjMYUaqou2hlj+qQjiJCgkQ6rndybT3OvZxXpnd O46NWrqoL6Qc6G7Jy1WLV0Wqjozv4SFJcO/xf260gez7T0LBAgN/G3s4Qlyh69q4XXHN ADcdyCatDh+kaNaKmrrLbtFqR/0IxUvRPiwXai+nxJoJzL7CIBXU0EKlei78jB+NM2/J 7RPS1EOti/BIQoxr0VZewGm7Qoqq5uzCfS3w3oY+nS9+Ta3esdWFUG0GO9l8ut1WzurO QhTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=K+K6g914agxSzdAPlI+h0RmOBH1n0CtAnyZzQVNjIUM=; b=Hsc3w96Sq4HXtjMTIlVNYUTT7VlvShyRecqP4oJZM1wckxwQms/guyxDonAZyf2A4P DstUwEGGQJyzoCEHWfmoWlUlQS5gFVUFwz2N+yjnmH5eEHS8zsbiCu/6X+VkpChYzwvS 0yUXr6ao9fo2b0llHZr2FGoFBNOSH2ru+cqv7Tfsc3o/3hefCPar3DGJEpkZnDP+omFH 0VEI99jgSktVV36owgf6XLSGUq1Upw4nm6+aYGt4AwNOMejboDYGsUS/KqhCeHAMmX+u cb7b5WM6ljkutuACkEyZy0AhiJ6f4mLhv6/BSS/d6HXeserWiV9cp/E1KFhTbFQWnO+Q hgoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LGPCz9Dv; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a05622a04cd00b003f6a9bea941si5225498qtx.567.2023.06.05.13.16.29; Mon, 05 Jun 2023 13:16:45 -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=@linaro.org header.s=google header.b=LGPCz9Dv; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235847AbjFETr2 (ORCPT + 99 others); Mon, 5 Jun 2023 15:47:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232297AbjFETr0 (ORCPT ); Mon, 5 Jun 2023 15:47:26 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3098F4 for ; Mon, 5 Jun 2023 12:47:18 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-777b0cae9ecso73095139f.2 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=k2d3cIc1GHVEG5RJFUDSCAy9MLTOZ9LaZay4mhNyor7nkOMpz2N93Xykj8q7/MKnpT fRI+m9Mzn1hcmbXzR+N/pUpiDPG0N9WX7J7H+GeaS5TIbEqsaMEErE4PZ+RUx0nN25AF tXKK3UREgki/BbpMmt4nlPqPnTDjndDiynZeso6MPqCPID0aE1yxyG7aWPCXpptJ0cs/ WvarY27BuM/Wdpa+WhuLtRvPYHEf6o9KPsphZM613PXLrQ9OCI8Rf02+7cWudHXAhv1i WMEyzFTpPRXe2WS0T6BGhdig72z0lkB6TZKNLwdMi99ZXA+LzAJeBP+sNjWksr6vQihB 5OvQ== X-Gm-Message-State: AC+VfDzCmFlFh1evsOlQE+Te3nwgao9EX7IyaF4bXDj8nxfBtRYXieOk cJ32ke4xBDIOkDBYA66NNG3yVQ== 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 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 */ > + }; > + };