Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5865577ioo; Wed, 1 Jun 2022 14:26:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaBnCYcnlVJ7YMk+g5XegbEMESC4X5XsfntqyUjJBpqbk4d7pfuSqQqEDJL4x9bOHt9O4k X-Received: by 2002:a17:90b:1e42:b0:1e6:8093:3fb6 with SMTP id pi2-20020a17090b1e4200b001e680933fb6mr747143pjb.166.1654118791349; Wed, 01 Jun 2022 14:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118791; cv=none; d=google.com; s=arc-20160816; b=Dekkx2d7gjoWm9eLscVnYksw/2XNJYh1Gysx6UYFtVbCBcraU58+piJuDHjQCGyJuD QY0AF1Kj1kPxLXx2lq6O9Kbpb8+UPKSikYHiT8wjSDwGUsXocK17Uu6Vfe7P6K9CcNca wKnjluWnFkY7CCMcdJOWM2pTMlt8hPHpxQvVSMvEBDFsu2Xx8U51TO6kOuhAFsoJB79R Yw9XFj3/rtsX/13mJh9DVOm4aLELBJsM0FcA9eqhb9jVwJkzTMpcHPVEWhk4AS06kLNP Zr3s/Va2hi8QSfEnKnIoFbO5VdUd9swYf9bmqvI85s8KA0jHCfZPh65j9uJUbrkVxZkk JAew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=pgwp2VdYx+Vpnhun4TNi+eC2topHBL0Uwk1ptGJfZcE=; b=ZoakWK3izSIps8K3l+aeRt7bxuSDgVF4Hj7LnVpD3E0WPUP44ZuNEr93Gn49Fq3LRz dZXQraxObjR30AFTZboQnvRSe/aSR+xdMC0qxG223PhRrziG+l0p/dIEc2ueS6WTILen B/h4aRFc+ELma9MzXfdXfj7pbdHn7rqAH9Y83yHKOGGBQgSISccTfGcFwya8KeI8F9Jd bBSNibnHjS4kDnUbDTqvUChzt0DxKM6nn6oACBXGqLF+et3SMD9RiEzm0a7YnYYI2Rap jvfnhmp/2zmMW/qz2o8L2t3ULF3fALHbySc2/XygfYSysf6CW/l9GmpMq8FKJ9XGnHyH C+ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iS5jhowO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u21-20020a656715000000b003fc573fa56dsi3578870pgf.6.2022.06.01.14.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iS5jhowO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6ED0D30C9E1; Wed, 1 Jun 2022 13:17:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343958AbiEaLwU (ORCPT + 99 others); Tue, 31 May 2022 07:52:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241631AbiEaLwT (ORCPT ); Tue, 31 May 2022 07:52:19 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 126B32229E for ; Tue, 31 May 2022 04:52:18 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id x62so5323981ede.10 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=qw4jnnMkDpcYtSJWCsm/t7y1HFDggxOm3jlA+NELqnSNxaea5UFFDhYF/aaRuGZBsC eM7VWHsWIGFO2CCZnrncHL4Cg0x+/RPzRyR06gX69/aGKNH9S1c6rOSE6moQx33IlHgx StfMhJZ3dPu+4GtCpOx7ClP1vUVldr1QH/Pc1sbgI+PNJqHpnMaF3J0aFtk/woCdT4ep 3xPQL7vWTxhSuq7UJ9KAcvI6rre4wPnYUD0ia7QJxpJVvtH+W8UdVMpgjYU6J8MFx3E0 soSqqgtb+/lMazRyhm1dxWvgVORmzoyXoR0NQd0iiDFWmH4cxY/B7r4ALhSbQK9pVNX3 qXKA== X-Gm-Message-State: AOAM530HJLfFxFMBIHxoTtlF5BDE/dmy1TRepZh6+Ph1q93wnxOmoqBA SSfUM/M9rgmjci4h9B63143S8Q== 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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