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 27D90EB64DC for ; Fri, 16 Jun 2023 16:32:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344178AbjFPQcl (ORCPT ); Fri, 16 Jun 2023 12:32:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343948AbjFPQcj (ORCPT ); Fri, 16 Jun 2023 12:32:39 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6EB630F1 for ; Fri, 16 Jun 2023 09:32:37 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-777b4716673so27477739f.1 for ; Fri, 16 Jun 2023 09:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686933157; x=1689525157; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=27BucVbJGmBPMM/ePWYXHXpruzrUnk1K2qiauBa6U6w=; b=p75neDQO9RFaCXBXb4VTCDLzw3oNuDrxwvEHbWCKcq58eoh4ThNA+jR72ziL8lCfLU Cd4cj5yx7pPzPLnTXcjZ5UHKdemuPVJ9Cv0iC5vPLOE/Tn9+AO92pYaBcN+MA5bljSt5 fLwH/M0ME25RVpU0wo1xHuK1BUnDwx4pexSTiD2YHQ80OxPGMferUkJ5oh/LVFXFpn9G ZUJly6SDFmzWhOKxyg8rFn/fOO+A9PPOowM7yJKK3AtdGczOHrMwM9lLWOoWf1M12WG5 cRbMteunWDnEDAj6ozVajdcvLHeuc+j6knMvoWenFurSIBvFOWzCTy7ZZt4Jox62FdKu cvqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686933157; x=1689525157; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=27BucVbJGmBPMM/ePWYXHXpruzrUnk1K2qiauBa6U6w=; b=JTkPCqiGV+weBS37QVdUpdBt8vAMpe0QauVfky+YgOZchd6F95gsWe7yNPJLPKee4i pAD3I28y+ahoQH6wgiMEpusvJrlt7YmY3iIs0YV7VljRS/UdK6CAAnWA7AivBy9O2apn a/9X4tBfTjkTBttUicCI/eamp7CnVlvhsL61rjDbXzM8QGR1htTUgdgmmtI1D7w2BLFn Z3Bw4KuFCvghB0UEkVuaJECl4Pt1lmm/BLTB3N9WOt2It4BHS7IJNoKYRIMaZ0FO8Tbq oLZ7YSRfDR8rfpWCrH3hC0/H7y8Qll2GB9cv39F5jO88it6e9JjDT/DJnozX8An17R2i qXjA== X-Gm-Message-State: AC+VfDzs7WfNo3L41OnHPgVWHDExNKJSAU+KRT6K/RJCGKdmDzKs5ml+ 1Q6IX6g68BHsyWyquGW0z1FqbA== X-Google-Smtp-Source: ACHHUZ6aWtyXtIoCHeSQHdFbRI0tSWDXdS9E+1oIA6eNu3too5L8oHgF3ZAPjcrK8Qvw90nXmXiKJA== X-Received: by 2002:a05:6602:4184:b0:77a:e8c6:9f15 with SMTP id bx4-20020a056602418400b0077ae8c69f15mr6110998iob.4.1686933157034; Fri, 16 Jun 2023 09:32:37 -0700 (PDT) Received: from [172.22.22.28] ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id k19-20020a02a713000000b0041ab38c1a4esm6425620jam.60.2023.06.16.09.32.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jun 2023 09:32:36 -0700 (PDT) Message-ID: <5b6a97cc-3604-7a37-b61d-018034dd37de@linaro.org> Date: Fri, 16 Jun 2023 11:32:35 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v14 02/25] dt-bindings: Add binding for gunyah hypervisor Content-Language: en-US To: Elliot Berman , Srinivas Kandagatla , Prakruthi Deepak Heragu , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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: <20230613172054.3959700-1-quic_eberman@quicinc.com> <20230613172054.3959700-3-quic_eberman@quicinc.com> From: Alex Elder In-Reply-To: <20230613172054.3959700-3-quic_eberman@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 6/13/23 12:20 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. Isn't the resource-manager property required? And there is exactly one of them? (Maybe those constraints are represented here; I learn something every time I try to write a YAML binding...) Anyway, this otherwise looks good to me. Reviewed-by: Alex Elder > 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 0000000000000..3fc0b043ac3cf > --- /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 */ > + }; > + };