Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp641218rwb; Fri, 4 Aug 2023 20:39:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/Yw+21fWurw+aa3auIwXU5YWgLhdg3kXjcVbS9R5iTp06yWhoPXjbXcUC/249EzjE53sY X-Received: by 2002:a17:903:1210:b0:1bb:7f71:df43 with SMTP id l16-20020a170903121000b001bb7f71df43mr4530716plh.34.1691206784852; Fri, 04 Aug 2023 20:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691206784; cv=none; d=google.com; s=arc-20160816; b=Dufao0doJGE2rnzzwwUabquXhHMaupwJncx61+vqadQblth3msnOJnJ0Bz0BWD+z3o V5EQLYLKNnd1a8ijyp2CE2z48AIsMk+VKlTm4EYFFzO0Od0/Pw9s/PT0NQwFSWoiVE7g m6dORNoPYhbYP7zNSm0tp8ElRer7njJMLfB6F4h4klUz7a/zf02CZQ0oE7a9Na/o32k/ RqHCq5XTqWHrU3bsZd7zaaIunwgtTuJh6JyWXBh1r3SKFX3EZdrXZDdLVDJYXizUYbTy 1fBVhkf8SCqOQ1Lus0m800ndS4v/QjpHdziAHCnypIfSo2hL5iVQ/2xiyQGDnRGG8tcy +z0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wCeLCeFTVuK1llUWWVQIynrKhT/630DMRgB3mb+2HmU=; fh=i6YryuiM2U+0a+1ZYRYOXnF1jPuIOjmrIGj3HvBX/ao=; b=EledW0Jrk+U1/39ehCe5FJzE0VmNoC6riMoiMy5y91eX6MeaULitLQmIYPCdWqiFvD S8G5NQC7YgA8w9NUX5vytTHqNbk8te1ItaiH6Ztcii0aNFugdkvT6EvC+5rq1OwmnaUD nyyvdLmGThe+GxvZxem2rxb5XR52U0WT8WZ1we3OvQJVq/vGkilHg+eOU+/NOYQsytDj t1pgSO+ovhofw+3GxEoUGrimECeg4A3KbeetlLdlrw9avsl7uewgUGW9NzMAHqNvq/wo fEqeEay85qDq7LiYM0RsybyZSHuW+Wf4LJdcybPZpDt+UIpKEi/Dp1gADhskiARyU+C3 dQMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QeDOaekO; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170902dad100b001bbbfe262e2si924205plx.430.2023.08.04.20.39.32; Fri, 04 Aug 2023 20:39:44 -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=@kernel.org header.s=k20201202 header.b=QeDOaekO; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbjHEDbc (ORCPT + 99 others); Fri, 4 Aug 2023 23:31:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjHEDb3 (ORCPT ); Fri, 4 Aug 2023 23:31:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 385024ED8; Fri, 4 Aug 2023 20:31:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C683B61783; Sat, 5 Aug 2023 03:31:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BFE8C433C8; Sat, 5 Aug 2023 03:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691206287; bh=Ygnq8tBAlMTkwF79cozfvveIrcpUJbIfQh8kZtFnv+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QeDOaekO4YVYv0JUdfTsvVADmqgv6gEjz49e3xvq9MHlPGQlOwXtJJ+XFL5nBlFFf mqPtwAspdvuZTEmDuEFIvuPUHtglf5RjESepXJjCMsJLhfUDIomNDV/ZmR3BwMSmhg IU4AaxJM/1OtKqoqp820EZ0ygZhc4+Y/CJQJ7eSNggwJr2s+uDhiZl73ZnOwIkA3Kx /rxuu/JlTMs2CSWZ7OK8rntBMDik3zuMJBi+yKH8hvaYeCjp2SV6gqc7CP4GujJH+H WKKR7Whq7vFPEz657qecUMmxQUTfL+6OZ6FG7rpLJLt1AqlnXXBFDLF3y1ePGfuPbd 8P0sSYNcaF6PA== Date: Fri, 4 Aug 2023 20:34:25 -0700 From: Bjorn Andersson To: Elliot Berman Cc: Alex Elder , Srinivas Kandagatla , Prakruthi Deepak Heragu , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Dmitry Baryshkov , 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 Subject: Re: [PATCH v14 02/25] dt-bindings: Add binding for gunyah hypervisor Message-ID: References: <20230613172054.3959700-1-quic_eberman@quicinc.com> <20230613172054.3959700-3-quic_eberman@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230613172054.3959700-3-quic_eberman@quicinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 Tue, Jun 13, 2023 at 10:20:30AM -0700, Elliot Berman wrote: > When Linux is booted as a guest under the Gunyah hypervisor, the Gunyah Is this unique to the case of booting Linux? > 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 > --- > .../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"; It's typical to carry the compatible first among the properties. Unrelated to the binding itself, I don't see any code that matches this compatible, and as such will probe the resource manager. What am I missing? > + > + gunyah-resource-mgr@0 { > + compatible = "gunyah-resource-manager"; > + interrupts = , /* TX full IRQ */ This is the "Tx no longer full IRQ", so the comment is misleading. > + ; /* RX empty IRQ */ And this irq seems to fire when there's data in the RX queue, not when it's empty... > + reg = <0x00000000 0x00000000>, <0x00000000 0x00000001>; > + /* TX, RX cap ids */ Wrapping this differently will make the comments more useful. Regards, Bjorn > + }; > + }; > -- > 2.40.0 >