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 2AAFFC433F5 for ; Tue, 31 May 2022 11:53:39 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tGja6GA70blIlKBBl/tSwhEEozaV8EEbLAMmBv2KcLo=; b=0tA85Ki/fU5rEV B5PtY0tgBa/CZQB+GJZMRFZ8+BEqtVAOQOpHei2Ik42opSmCIPmfKaett4BTB1wLnkaCRK1vY5Mo0 P7yM5+Zzjq1A5ql/2WQ65JJJLvMtvMGlcNkLxw+QHEAfJZcY5WVE8bRqKDLGqU2TUwG28o5/vXb6M ogc6PdZVvFBSWv3CDRmjocaSVJ7h+6+6oi8ikmtSDrrKmDHnY+zPSQM99CUW8N3vq3vHPZR+LTm6A 8kgoR5qxFBMVJeKynRrVBUO5teDeQ4r8yWxfkPXqGfGoSqCGMxl0dWmR8oXufVY2GjQVs4pJFGzLT aAZF6d+2VCCxQ4++SzGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw0Q9-00Ab7V-KJ; Tue, 31 May 2022 11:52:21 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw0Q6-00Ab6K-4D for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2022 11:52:19 +0000 Received: by mail-ed1-x52d.google.com with SMTP id t5so17171216edc.2 for ; Tue, 31 May 2022 04:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=pgwp2VdYx+Vpnhun4TNi+eC2topHBL0Uwk1ptGJfZcE=; b=iS5jhowOcF/lfXAMYJ1n2lLpF7hUtwsQikH8pir763iCnTkaHoMbpuD2JWonqpofGu qjyArBVFBAgZQ9fQpr/S/sNnTQgp1XR5p/rqsj3MhdJ+R24/EaY9Jbv7/STxX0BhfOae vvpJfMMcFbUtqlhICqYrW8DyeWTZfTB31dRM0WNqVaDsLbFsSSYIr3kJMkl8EIu8eyG0 IjQQuD7laFKec1PktUnxtrsiM3a+rYcN+wihWCwjJw7hyQww5pG4m0uXI4PcjIotDFcu f+NP9XC8R9LGUd3NPhygDtKFvwynWln1GjMt/3m1CHmsTLxPB1Nv/M1Gb8i3wsWht7ok zmHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=pgwp2VdYx+Vpnhun4TNi+eC2topHBL0Uwk1ptGJfZcE=; b=fXh95GtYZ0CQ+WXIiEUBvE3CS85pjAY0RfoyKmpzCtRTD+A6lF4o8HBdsi3sceqTfh ah7zu95nXG1fgfjvGkoJ4qNEbTtR8pw+fELK4LPE6nWujLn8B4B+5tBcaP9IoEXDHtJX jcP6Ps/rvOHcSJwXZ8wY/PY09v/3GXWDOTTrHtAnUjdOsyjPs+MdF7ImKijwddfST3+l UzBoOJbQjxcfPoRy3NRVB4BzqxnjL6McwcnJWcdbmn7oOYVH6wJDQZboKfXbqGUejFpa 8mLK7GdtUxJOIKnDNT3vTJyuEG94kCwn51ZAtjTnVsskr5Pfjs3lPYlyfHWb4PGNF0TB X3QQ== X-Gm-Message-State: AOAM5316xaX2/swZ+wadgj2heB5dufYJj+W92kx0DVUaJt/o2UDKN9cG m7m3Lse2/gJtPncKL4zPtPLVsw== X-Google-Smtp-Source: ABdhPJzLoz1xLJgBhIhIcXu/CVKt7lUZqurHOJkAtVo1mU8l+2AAQXVVLJ65/yyrjl+Cx6OqWRo0rg== X-Received: by 2002:aa7:c852:0:b0:42d:70d8:2864 with SMTP id g18-20020aa7c852000000b0042d70d82864mr19815609edt.379.1653997936660; Tue, 31 May 2022 04:52:16 -0700 (PDT) Received: from [192.168.0.179] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id c13-20020a50d64d000000b0042617ba63cfsm8278497edj.89.2022.05.31.04.52.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 04:52:16 -0700 (PDT) Message-ID: <15eef004-74c7-0eb5-3f87-86e164ef70ff@linaro.org> Date: Tue, 31 May 2022 13:52:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V3 5/8] dt-bindings: Add xen,grant-dma IOMMU description for xen-grant DMA ops Content-Language: en-US To: Oleksandr Tyshchenko , xen-devel@lists.xenproject.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org Cc: Oleksandr Tyshchenko , Rob Herring , Joerg Roedel , Will Deacon , Krzysztof Kozlowski , Julien Grall , Juergen Gross , Stefano Stabellini , "Michael S. Tsirkin" , Christoph Hellwig , Arnd Bergmann References: <1653944417-17168-1-git-send-email-olekstysh@gmail.com> <1653944417-17168-6-git-send-email-olekstysh@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <1653944417-17168-6-git-send-email-olekstysh@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220531_045218_222320_E18C209B X-CRM114-Status: GOOD ( 19.81 ) 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 30/05/2022 23:00, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko Thank you for your patch. There is something to discuss/improve. > diff --git a/Documentation/devicetree/bindings/iommu/xen,grant-dma.yaml b/Documentation/devicetree/bindings/iommu/xen,grant-dma.yaml > new file mode 100644 > index 00000000..ab5765c > --- /dev/null > +++ b/Documentation/devicetree/bindings/iommu/xen,grant-dma.yaml > @@ -0,0 +1,49 @@ > +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iommu/xen,grant-dma.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Xen specific IOMMU for virtualized devices (e.g. virtio) > + > +maintainers: > + - Stefano Stabellini > + > +description: > + The reference to Xen specific IOMMU node using "iommus" property indicates > + that Xen grant mappings need to be enabled for the device, and it specifies > + the ID of the domain where the corresponding backend resides. > + The binding is required to restrict memory access using Xen grant mappings. > + > +properties: > + compatible: > + const: xen,grant-dma > + > + '#iommu-cells': > + const: 1 > + description: > + Xen specific IOMMU is multiple-master IOMMU device. > + The single cell describes the domid (domain ID) of the domain where > + the backend is running. > + > +required: > + - compatible > + - "#iommu-cells" > + > +additionalProperties: false > + > +examples: > + - | > + xen_iommu { No underscores in node names, generic node names, so this looks like "iommu". > + compatible = "xen,grant-dma"; > + #iommu-cells = <1>; > + }; > + > + virtio@3000 { > + compatible = "virtio,mmio"; > + reg = <0x3000 0x100>; > + interrupts = <41>; > + > + /* The backend is located in Xen domain with ID 1 */ > + iommus = <&xen_iommu 1>; There is no need usually to give consumer examples in provider binding. If there is nothing specific here (looks exactly like every IOMMU consumer in Linux kernel), drop the consumer. > + }; Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel