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 9B7ADC43219 for ; Wed, 2 Nov 2022 18:47:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbiKBSrc (ORCPT ); Wed, 2 Nov 2022 14:47:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231694AbiKBSrS (ORCPT ); Wed, 2 Nov 2022 14:47:18 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDD062FFDD for ; Wed, 2 Nov 2022 11:47:12 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id fz10so6222567qtb.3 for ; Wed, 02 Nov 2022 11:47:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=wtKcJi4R+48TsMqCQH8XbgPczt6c7dDfQAB3HD59hhY=; b=pfumJRZiHgyJtXnF8PDr9lKiJtTxPbqBr1M1hCs6+w3gsHb3qhj7zcyp30HmvnyZjt nY51eJMa4l0wv1s/JGywDrh7oO19aAsyEiieQ/7q0RntsmIjE90KfUtY4kzzlCmTgaCk IqaVAr0069VGzZNijegHpWaNlTeHpIaGa7TuPDAkkc3cEngVPMx3+/JgNezm9OHrqyqJ v+fCkElj1RSKTTZ2m9UwiTZ0Q4c3lsr63S7Kf8juhl9tWLLge9nZKtwbIrcZeb/ynqId AZ8ImC5YP698K5O0sEHzd/xM8KXBr/L6ovJoW1TQcVHE21bHXw33jqHqoB68nyEBMPTn +5tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=wtKcJi4R+48TsMqCQH8XbgPczt6c7dDfQAB3HD59hhY=; b=x0QxVdZlBj8QjvxUHVd/ZCy18u0TaR3//+MzctSEn8N1zxzoK+59pSVI4FYQA6vHSe d3i0DV5mZIUgTg70hXM+0dl73g5ib4og2ZWR8hHVVUluZYU3H0fTgp88xPo/SFZSVSQO M61hiPJoeV/O/fe8DozKY7Lryv/pmn117+MnHAd1qwYXkgLGk6seoSbwGMghK6mw2r0t LvuVbvBBp6m4eHcELLaui+GMT+giJ8+3VPQx4/lHRukXiLDBBgeL8Ldpm5dNzNYJ4phf jba37QgvNZF0CEn/BD7/z1l1SPT8NmIhMI9YD0mZQ6K0YABKP7ClFRhZ5SytTpOohOdy z3gw== X-Gm-Message-State: ACrzQf1LyZD+OiJtyd8ynDoQaBGyArtgULT4ZDFpvPj5vFy8u/s91qn5 7Srwx4GZKY7LfIOiI02dfBM5Mw== X-Google-Smtp-Source: AMsMyM7tImKnGk9XhaAiOo0zzhJ2EQR6Zs464t+GgKh7kg2gdsVZ7zA3dCADMCh4CvutPud+rvmN1A== X-Received: by 2002:a05:622a:64f:b0:3a5:d40:b58d with SMTP id a15-20020a05622a064f00b003a50d40b58dmr21547399qtb.308.1667414832073; Wed, 02 Nov 2022 11:47:12 -0700 (PDT) Received: from ?IPV6:2601:586:5000:570:28d9:4790:bc16:cc93? ([2601:586:5000:570:28d9:4790:bc16:cc93]) by smtp.gmail.com with ESMTPSA id g19-20020a05620a40d300b006eea4b5abcesm9162922qko.89.2022.11.02.11.47.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Nov 2022 11:47:11 -0700 (PDT) Message-ID: Date: Wed, 2 Nov 2022 14:47:09 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v5 02/13] dt-bindings: Add binding for gunyah hypervisor Content-Language: en-US To: Elliot Berman , Rob Herring Cc: Bjorn Andersson , Krzysztof Kozlowski , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Prakruthi Deepak Heragu , Andy Gross , Dmitry Baryshkov , Jassi Brar , linux-arm-kernel@lists.infradead.org, Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Marc Zyngier , Jonathan Corbet , Will Deacon , Catalin Marinas , Arnd Bergmann , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221011000840.289033-1-quic_eberman@quicinc.com> <20221011000840.289033-3-quic_eberman@quicinc.com> <20221012155645.GA2173829-robh@kernel.org> <75ef3cc5-3b19-9eab-b3eb-56fa254d92bd@quicinc.com> <79673829-a079-201f-91e1-790eb7cc3a4b@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 31/10/2022 23:19, Elliot Berman wrote: > > > On 10/27/2022 12:55 PM, Krzysztof Kozlowski wrote: >> On 27/10/2022 12:17, Elliot Berman wrote: >>> Hi Rob, >>> >>> On 10/26/2022 2:16 PM, Rob Herring wrote: >>>> On Thu, Oct 13, 2022 at 6:59 PM Elliot Berman wrote: >>>>> >>>>> >>>>> On 10/12/2022 8:56 AM, Rob Herring wrote: >>>>>> On Mon, Oct 10, 2022 at 05:08:29PM -0700, 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. >>>>>>> >>>>>>> Signed-off-by: Elliot Berman >>>>>>> --- >>>>>>> .../bindings/firmware/gunyah-hypervisor.yaml | 87 +++++++++++++++++++ >>>>>>> MAINTAINERS | 1 + >>>>>>> 2 files changed, 88 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..f0a14101e2fd >>>>>>> --- /dev/null >>>>>>> +++ b/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml >>>>>>> @@ -0,0 +1,87 @@ >>>>>>> +# 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: >>>>>>> + - Murali Nalajala >>>>>>> + - Elliot Berman >>>>>>> + >>>>>>> +description: |+ >>>>>>> + On systems which support devicetree, Gunyah generates and overlays a deviceetree overlay which >>>>>> >>>>>> How you end up with the node (applying an overlay) is not relavent to >>>>>> the binding. >>>>>> >>>>>>> + describes the basic configuration of the hypervisor. Virtual machines use this information to determine >>>>>>> + the capability IDs of the message queues used to communicate with the Gunyah Resource Manager. >>>>>> >>>>>> Wrap at 80. That is the coding standard still though 100 is deemed >>>>>> allowed. And yamllint only complains at 110 because I didn't care to fix >>>>>> everyones lines over 100. >>>>>> >>>>>>> + See also: https://github.com/quic/gunyah-resource-manager/blob/develop/src/vm_creation/dto_construct.c >>>>>>> + >>>>>>> +properties: >>>>>>> + compatible: >>>>>>> + items: >>>>>>> + - const: gunyah-hypervisor-1.0 >>>>>>> + - const: gunyah-hypervisor >>>>>> >>>>>> 2 compatibles implies a difference between the 2. What's the difference? >>>>>> Where does '1.0' come from? >>>>>> >>>>> >>>>> There's no difference. I thought the convention was to have >>>>> device-specific compatible and the generic compatible. "device-specific" >>>>> here would be specific to version of Gunyah since it's software. >>>> >>>> No, that's just what people do because "vendor,new-soc", >>>> "vendor,old-soc" seems to bother them for some reason. At the end of >>>> the day, it's just a string identifier that means something. If >>>> there's no difference in that 'something', then there is no point in >>>> having more than one string. >>>> >>>> You only need something specific enough to discover the rest from the >>>> firmware. When that changes, then you add a new compatible. Of course, >>>> if you want existing OSs to work, then better not change the >>>> compatible. >>>> >>> >>> Thanks for the info, I'll drop the "-1.0" suffix. >> >> You still did not answer from where does 1.0 come from... Compatibles >> are usually expected to be specific. >> > > The 1.0 comes from the Gunyah version. This is the same version returned > by "hyp_identify" hypercall. Then dropping 1.0 makes sense - your SW provides auto-detection. Best regards, Krzysztof