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 53DFDC433F5 for ; Sun, 17 Apr 2022 17:24:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234623AbiDQR0t (ORCPT ); Sun, 17 Apr 2022 13:26:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231211AbiDQR0r (ORCPT ); Sun, 17 Apr 2022 13:26:47 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0294A1CFC1; Sun, 17 Apr 2022 10:24:11 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id a8so14400596ljq.5; Sun, 17 Apr 2022 10:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=BzXYSzvfK+AdGCOQfhtjoV/H2s/prwGV3n0qtSorc04=; b=TfLFZImLLGFLitXlcV5CC54oDV7wPZeOc/E2oAolOwNyvhSJHXphZzRM3dpmgyQCRe ODu5+qawstLwAF36zv5uxkWthN/ZlZOrbjCYMoCwpDAsndrnK+ej6cNahBLYhNLoef6y HxDXOb8x6+XUKiBRtkH9U5lx0lFSfg/W2AGqhAS7h6HYThF9BdulGC9ibWBSuolxF1E0 Y4FCW/iFqBg3x9L5byXkdwS1MzVqYmaLs0/WNqkLUpfRLWU/WvP1TbUJZrBsaS6jibsY 0nbYf0kkYmnEpQRsopT0oZlbiK7KPhDsohAdwvHLRkyQYq5YGkwVe/LDNEY9dcO5VVKK 0v3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=BzXYSzvfK+AdGCOQfhtjoV/H2s/prwGV3n0qtSorc04=; b=AnGwbzhl6k33kSppAuGTWtQfiKKsfejXhbp47KZftsDE0ff3/gKKMQNbVaeDxpgb1x vlPAnTcchPR9E3orp8fYYuYbea8LWLTMT4X2hfq8Wv7KrwLDPbZvp2SEBWXxICiOJIli UBwRDThWV0Y7QQPigvr5EpVJBF0oslc9lviCWSfA9mngKSUdNiZTUaRnvnNP4w6NKzgF 7BJHulGZoDg4GjquvC8KCZHBogdvGX6sEw6wsCIg1oMrNuabfDCWvVAz/KcwLKeax2JV Kn3Rm+FNkozqzFjEul1Grs4Kvvn61C49sYHpbtce/9lsTXeqSFzImeqR+gfzgd2bdUkZ bzZg== X-Gm-Message-State: AOAM530lbSceATWuf+V2SiF3LkKjM3LrmA4DL7FNGnYR6F2yjjF0KJyH 5dLgyKBIWwOdDuVCZJPG/Qw= X-Google-Smtp-Source: ABdhPJxTemiKeMLlnU7cPGCdgJGGmlp8j7m20rDTsAgzxwVprfeIhsQG7I18pOXBCqf5AZgV84wFEQ== X-Received: by 2002:a2e:9654:0:b0:24d:b57c:5f29 with SMTP id z20-20020a2e9654000000b0024db57c5f29mr2869471ljh.70.1650216249064; Sun, 17 Apr 2022 10:24:09 -0700 (PDT) Received: from [192.168.1.7] ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id o2-20020a056512052200b0047067a6e5d5sm524448lfc.218.2022.04.17.10.24.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Apr 2022 10:24:08 -0700 (PDT) Subject: Re: [RFC PATCH 3/6] dt-bindings: xen: Add xen,dev-domid property description for xen-virtio layer To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Oleksandr Tyshchenko , "Michael S. Tsirkin" , Jason Wang , Rob Herring , Krzysztof Kozlowski , Julien Grall , Juergen Gross , Christoph Hellwig , linux-arm-kernel@lists.infradead.org References: <1649963973-22879-1-git-send-email-olekstysh@gmail.com> <1649963973-22879-4-git-send-email-olekstysh@gmail.com> From: Oleksandr Message-ID: Date: Sun, 17 Apr 2022 20:24:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16.04.22 01:01, Stefano Stabellini wrote: Hello Stefano > On Thu, 14 Apr 2022, Oleksandr Tyshchenko wrote: >> From: Oleksandr Tyshchenko >> >> Introduce Xen specific binding for the virtio-mmio device to be used >> by Xen virtio support driver in a subsequent commit. >> >> This binding 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. >> >> Signed-off-by: Oleksandr Tyshchenko >> --- >> .../devicetree/bindings/virtio/xen,dev-domid.yaml | 39 ++++++++++++++++++++++ >> 1 file changed, 39 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml >> >> diff --git a/Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml b/Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml >> new file mode 100644 >> index 00000000..78be993 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml >> @@ -0,0 +1,39 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/virtio/xen,dev-domid.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Xen specific binding for the virtio device >> + >> +maintainers: >> + - Oleksandr Tyshchenko >> + >> +select: true >> + >> +description: >> + This binding 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. >> + >> + Note that current and generic "iommus" bindings are mutually exclusive, since >> + the restricted memory access model on Xen behaves as a kind of software IOMMU. > I don't think that this last statement is necessary or fully accurate, so > I would remove it. ok, will remove > Other than that, this looks good to me. thank you > > >> +properties: >> + xen,dev-domid: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + description: >> + Should contain the ID of device's domain. > Maybe better as: > "The domid (domain ID) of the domain where the device (backend) is running" ok, will change > > > >> +additionalProperties: true >> + >> +examples: >> + - | >> + virtio_block@3000 { >> + compatible = "virtio,mmio"; >> + reg = <0x3000 0x100>; >> + interrupts = <41>; >> + >> + /* The device is located in Xen domain with ID 1 */ >> + xen,dev-domid = <1>; >> + }; >> -- >> 2.7.4 >> -- Regards, Oleksandr Tyshchenko 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 CAA73C433EF for ; Sun, 17 Apr 2022 17:25:20 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yJc2tb70kZ66RM2IRE5QQ9XdIAYD1Cncj3urUKWZmDg=; b=T3fz4BGELgvFbL40J6roOWhFt7 VPPpP+xJTQttq6RPkqfctbW+LGorGVHdlexxVdhxP3981CJ/WSqv9QRlq03mAKWSUmw69B1EXLFTU iOmttwgrBNIQDLr6yYIiH5MX01Z3lM/JhjH7g950OvDMp7nsjDgNXccn6gJjm6jVVewcAA0Y6ZYwL kQmu76aNMbOCEtdpFBOoNKcj1AIM0uxSsdlPUR/oLXAdRx82Y/l6OmcHOANOz9IASxNSHSRJDZgkN Rqo55G78fKJZHfhsSp5B/4EBI83XyduJ9ixodmKpkB/y7TULeNvyJQ6//KNIwKVA2mi+IDw/hfnMe jXI4Klug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ng8dC-00Eite-Jh; Sun, 17 Apr 2022 17:24:14 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ng8d9-00Eis1-7u for linux-arm-kernel@lists.infradead.org; Sun, 17 Apr 2022 17:24:13 +0000 Received: by mail-lj1-x22f.google.com with SMTP id r18so14684450ljp.0 for ; Sun, 17 Apr 2022 10:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=BzXYSzvfK+AdGCOQfhtjoV/H2s/prwGV3n0qtSorc04=; b=TfLFZImLLGFLitXlcV5CC54oDV7wPZeOc/E2oAolOwNyvhSJHXphZzRM3dpmgyQCRe ODu5+qawstLwAF36zv5uxkWthN/ZlZOrbjCYMoCwpDAsndrnK+ej6cNahBLYhNLoef6y HxDXOb8x6+XUKiBRtkH9U5lx0lFSfg/W2AGqhAS7h6HYThF9BdulGC9ibWBSuolxF1E0 Y4FCW/iFqBg3x9L5byXkdwS1MzVqYmaLs0/WNqkLUpfRLWU/WvP1TbUJZrBsaS6jibsY 0nbYf0kkYmnEpQRsopT0oZlbiK7KPhDsohAdwvHLRkyQYq5YGkwVe/LDNEY9dcO5VVKK 0v3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=BzXYSzvfK+AdGCOQfhtjoV/H2s/prwGV3n0qtSorc04=; b=ugST4ZGUL7bnGSxcdDYnA40sKbx70swfuq3NENQq9F/oLvxFrv3yuXGayJkQeUgNEd ti4BoA1GSLn8t+JCZC6KDEe48P4j4IT0r8wsDQaySiPvdZbrXS0U+qc3mZykHCSGJW62 WhhCHWs1WGMg+DkFuLG5mW38SyGabeK9mc+giNVL5Bp1U5m7UIzyrCeT6rkALx+xBPWQ 6mkytSkKnI2HiFBLy8GAATBAmkK0mKnRAChcGXlEWHR+fgNrTOWSDTKZB/pF6lKLxRM6 K1V2IuAXWJGiHUYBGUosAUV7OAuaqMy8kiXd7d7qIbIBW8Udsu05lK+6DtCcY9Ni4zwE Lp1A== X-Gm-Message-State: AOAM532IGHxRIFA/v0G0DrS9ylkMJizrh25XIsoKW9Y/tk1lOpiJI28U sqLYmv+KEMKJHRbO/yBXD6gQjXk9lmQ= X-Google-Smtp-Source: ABdhPJxTemiKeMLlnU7cPGCdgJGGmlp8j7m20rDTsAgzxwVprfeIhsQG7I18pOXBCqf5AZgV84wFEQ== X-Received: by 2002:a2e:9654:0:b0:24d:b57c:5f29 with SMTP id z20-20020a2e9654000000b0024db57c5f29mr2869471ljh.70.1650216249064; Sun, 17 Apr 2022 10:24:09 -0700 (PDT) Received: from [192.168.1.7] ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id o2-20020a056512052200b0047067a6e5d5sm524448lfc.218.2022.04.17.10.24.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Apr 2022 10:24:08 -0700 (PDT) Subject: Re: [RFC PATCH 3/6] dt-bindings: xen: Add xen,dev-domid property description for xen-virtio layer To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Oleksandr Tyshchenko , "Michael S. Tsirkin" , Jason Wang , Rob Herring , Krzysztof Kozlowski , Julien Grall , Juergen Gross , Christoph Hellwig , linux-arm-kernel@lists.infradead.org References: <1649963973-22879-1-git-send-email-olekstysh@gmail.com> <1649963973-22879-4-git-send-email-olekstysh@gmail.com> From: Oleksandr Message-ID: Date: Sun, 17 Apr 2022 20:24:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220417_102411_369680_8B4B2C4C X-CRM114-Status: GOOD ( 23.93 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 16.04.22 01:01, Stefano Stabellini wrote: Hello Stefano > On Thu, 14 Apr 2022, Oleksandr Tyshchenko wrote: >> From: Oleksandr Tyshchenko >> >> Introduce Xen specific binding for the virtio-mmio device to be used >> by Xen virtio support driver in a subsequent commit. >> >> This binding 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. >> >> Signed-off-by: Oleksandr Tyshchenko >> --- >> .../devicetree/bindings/virtio/xen,dev-domid.yaml | 39 ++++++++++++++++++++++ >> 1 file changed, 39 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml >> >> diff --git a/Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml b/Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml >> new file mode 100644 >> index 00000000..78be993 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/virtio/xen,dev-domid.yaml >> @@ -0,0 +1,39 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/virtio/xen,dev-domid.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Xen specific binding for the virtio device >> + >> +maintainers: >> + - Oleksandr Tyshchenko >> + >> +select: true >> + >> +description: >> + This binding 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. >> + >> + Note that current and generic "iommus" bindings are mutually exclusive, since >> + the restricted memory access model on Xen behaves as a kind of software IOMMU. > I don't think that this last statement is necessary or fully accurate, so > I would remove it. ok, will remove > Other than that, this looks good to me. thank you > > >> +properties: >> + xen,dev-domid: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + description: >> + Should contain the ID of device's domain. > Maybe better as: > "The domid (domain ID) of the domain where the device (backend) is running" ok, will change > > > >> +additionalProperties: true >> + >> +examples: >> + - | >> + virtio_block@3000 { >> + compatible = "virtio,mmio"; >> + reg = <0x3000 0x100>; >> + interrupts = <41>; >> + >> + /* The device is located in Xen domain with ID 1 */ >> + xen,dev-domid = <1>; >> + }; >> -- >> 2.7.4 >> -- Regards, Oleksandr Tyshchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel