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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C23FFC433FE for ; Mon, 2 May 2022 22:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n8fSBy6G5jptvhrD9Qckb3TVRukR135l1Giw4TbgNVc=; b=qkc7aDoqc/0ZCO ODnNsL+v9BgGrOEWnk93KtZAkZMqE5VwY5VK5TNv6NX2RqfkP+M18n++aroehdYWFhIS0kTfMroO5 bn1zlhJDHirU38EK5lusLV0yZLISsD0ZOyzioYI5NVsu1tBq/QwTiVeyBHzGNGDnvjHBMt85ywByx DI3KInABq/PBhof5AFy4+anb84vzQL8eqg1RCNmM/DfcPGFle1QFd/9QHRNp7aFR9IRxQjn2lzHAx D8iJ2tinD6hRlQ+z52fcTBLFbha+jwWgf8g2fieIScGsc1Y6zLw9n7wLvLZZCJK2LqUt7D8aELM7J ppSFOlCmPqt4oCIDOReg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nle5A-002r8n-Lz; Mon, 02 May 2022 21:59:52 +0000 Received: from mail-oo1-f41.google.com ([209.85.161.41]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nle56-002r83-UJ for linux-arm-kernel@lists.infradead.org; Mon, 02 May 2022 21:59:50 +0000 Received: by mail-oo1-f41.google.com with SMTP id o10-20020a4abe8a000000b0035eac0a004aso2138135oop.11 for ; Mon, 02 May 2022 14:59:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OfkNLJQzEZ7e5xPqfxUYJG64Wv+bQWkevq09mi7Lx3c=; b=eFjuj4Zi5CYX/IQZMIihZk+Mwe6aKbkPLx1jzBSR6kf6mVRYRtdzGukOzKkMDk4fF1 3Qz2iFWrXtREtVIQ+ewLvh9U/dTK897+p5y8lWWn6DBy728JiSpWRw9lGcn9ZmI9Z0ZI n4g+8ByREVaRwSzHi4PGfUfC2jX/cn+EEmO9FShq05znWEGPrzNtiJPdp/YmhJ9alfCZ UIad64dn4CxQqB5lQjeMNtTxFCwauqlqYewq33yo/3IjppOH2qBzwC34OjaJykIde/Q6 RljTCaz30dEbOauzqM5oqX/6DRSnUuF7jKDcPWKjB7xR1NjpCbImxtlwYEPRpmVBg/M0 hgpg== X-Gm-Message-State: AOAM531BDFFp0UNk4GVSmfy/uCtB54SEjQRq8G6Z2JMxG1cqTvRupWzE g15AnupVBtlNt/q64wgYvg== X-Google-Smtp-Source: ABdhPJx1LDExPGSXpHz8IMEURBsoMHXT9iZfDmEKZxw3kRgHSp4/DSf2T1IKY9UfgGxULbEh9lAUBQ== X-Received: by 2002:a4a:ac45:0:b0:35e:a8f2:7f55 with SMTP id q5-20020a4aac45000000b0035ea8f27f55mr4805941oon.46.1651528786470; Mon, 02 May 2022 14:59:46 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id s1-20020a4ae541000000b0035eb4e5a6c8sm4329464oot.30.2022.05.02.14.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 14:59:46 -0700 (PDT) Received: (nullmailer pid 1863055 invoked by uid 1000); Mon, 02 May 2022 21:59:45 -0000 Date: Mon, 2 May 2022 16:59:45 -0500 From: Rob Herring To: Oleksandr Tyshchenko Cc: xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Oleksandr Tyshchenko , Jason Wang , Krzysztof Kozlowski , Julien Grall , Juergen Gross , Stefano Stabellini , "Michael S. Tsirkin" , Christoph Hellwig Subject: Re: [PATCH V1 4/6] dt-bindings: Add xen,dev-domid property description for xen-grant DMA ops Message-ID: References: <1650646263-22047-1-git-send-email-olekstysh@gmail.com> <1650646263-22047-5-git-send-email-olekstysh@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1650646263-22047-5-git-send-email-olekstysh@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220502_145949_052548_F42848E9 X-CRM114-Status: GOOD ( 28.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 22, 2022 at 07:51:01PM +0300, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Introduce Xen specific binding for the virtualized device (e.g. virtio) > to be used by Xen grant DMA-mapping layer in the subsequent commit. > > This binding indicates that Xen grant mappings scheme needs to be > enabled for the device which DT node contains that property and specifies > the ID of Xen domain where the corresponding backend resides. The ID > (domid) is used as an argument to the grant mapping APIs. > > This is needed for the option to restrict memory access using Xen grant > mappings to work which primary goal is to enable using virtio devices > in Xen guests. > > Signed-off-by: Oleksandr Tyshchenko > --- > Changes RFC -> V1: > - update commit subject/description and text in description > - move to devicetree/bindings/arm/ > --- > .../devicetree/bindings/arm/xen,dev-domid.yaml | 37 ++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100644 Documentation/devicetree/bindings/arm/xen,dev-domid.yaml > > diff --git a/Documentation/devicetree/bindings/arm/xen,dev-domid.yaml b/Documentation/devicetree/bindings/arm/xen,dev-domid.yaml > new file mode 100644 > index 00000000..ef0f747 > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/xen,dev-domid.yaml > @@ -0,0 +1,37 @@ > +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/arm/xen,dev-domid.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Xen specific binding for the virtualized device (e.g. virtio) > + > +maintainers: > + - Oleksandr Tyshchenko > + > +select: true Do we really need to support this property everywhere? > + > +description: > + This binding indicates that Xen grant mappings scheme needs to be enabled > + for that device and specifies the ID of Xen domain where the corresponding > + device (backend) resides. This is needed for the option to restrict memory > + access using Xen grant mappings to work. > + > +properties: > + xen,dev-domid: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + The domid (domain ID) of the domain where the device (backend) is running. > + > +additionalProperties: true > + > +examples: > + - | > + virtio_block@3000 { virtio@3000 > + compatible = "virtio,mmio"; > + reg = <0x3000 0x100>; > + interrupts = <41>; > + > + /* The device is located in Xen domain with ID 1 */ > + xen,dev-domid = <1>; This fails validation: Documentation/devicetree/bindings/arm/xen,dev-domid.example.dtb: virtio_block@3000: xen,dev-domid: [[1]] is not of type 'object' From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/virtio/mmio.yaml The property has to be added to the virtio/mmio.yaml schema. If it is not needed elsewhere, then *just* add the property there. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel