From patchwork Fri Apr 22 16:51:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Tyshchenko X-Patchwork-Id: 12823778 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 1A214C433F5 for ; Fri, 22 Apr 2022 16:53:22 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wlMby1Ix+niHctsyzJkXX4+vAzMfXlQdwr5wT/km+vM=; b=Uc/F11lDjkuONa no/TcCmV49NkGFv7n3A+losy9XpxYbMeGugzfO+48V13DsA3TXy3GIh2n7xAWkfxtV3O5SA/NH/fP Wiw9XbEGMZuZsigxYozz9vJ1HhTsLtx1N0h/cBC3/fQSjGlAmNPOHRdiM4aB4xbtzCH0ITFvkX1b5 kSHQXbxS4gClml0ebmhw6Phjos3/DOtDad0r6vzXhUf9fGeexItwspkQ/ys5I8D/OyrNRhxFFCiiG rT1SRDpRNUV8aFwqBwl6RzawmlxvSpNenbRVX4K2MkzlGbze0olfchfpIUVzAeYaMul3Rwc4Ch11t lc5N5lkozzys4rkci2TQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhwW2-001YS3-Rw; Fri, 22 Apr 2022 16:52:19 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhwVC-001Y6C-LV for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 16:51:29 +0000 Received: by mail-lf1-x12e.google.com with SMTP id p10so15276236lfa.12 for ; Fri, 22 Apr 2022 09:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=99hspxuLODhQpov2wjpLVe38h5x1eJYakvWm7x8e6iI=; b=F23kF0eGH2ZVB+UGEjmW9/zKmFnzoAMLghAwzApvwMCcMhtBG9yJPpY4U1QzTxgJqh dlRXZHbEg3zZ7nY0RRV+8fUOu1XkZkXeqKyrW16n02fiZBATqOd2CzVkTaqbBEsKlX+6 r6aK5PoP5QLM42PK/aLq8s/VUKQChEmq/ezbmXtxZxY1a/RDaoMGUVuns/+Ft+exgVHV qbfu1h52HdfRiNt9rNvFnhuiPOsYt6N8H7gak3I0DBjmtU3G2m7PdaKAunzdkWOdWVMV ovHh6R/nKxeNIZ67iu83BqdSWGokrQ3h7RK4/vcpMr2+xi4nqmoXe2TQmCa8LS8q13oq 2CTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=99hspxuLODhQpov2wjpLVe38h5x1eJYakvWm7x8e6iI=; b=B3ckiEk2hFzTsVtFfKXLp8F0nnHjE/514QZMc0PXPWEHRudy9BHuD2Kx0Dzy/74Kog qgkG8Zsudj95TPkATZrAoyDSMBSqYtU2kFr5kA14AowQcqEubrqF/d9/coiRz7BCGaW+ kjkmodTemSvZPgfUPvSyMp9GWMQQGjIkFVaaGrfReo3Q2jygm/OD4lG4g24VJNGZdJvC rZH53tO+eSx7pJbrdS/zo5aY/+iHCY3UaH8fBf9vwCaI2BiRENT6HoQCxX58XKKuRYT0 BzWfcrnu4qAJmhAe02q6PZB4yY9eeR8EoeLeLPxS6NhPwLcg+xFXTN3oidTu8AmyjVlj UowA== X-Gm-Message-State: AOAM531P5tMPuQ0Ug48cjoQu0bssMNQWR2rjBPUqr55VJgqQ60CPojrI P28wU3gdBOHOaMEw1js9nBk= X-Google-Smtp-Source: ABdhPJxHzbye4XRLnSvBlQObswNpXjTS3XrDqE1jJLqg0maTMcfec1EnyxM49kxDQRnXmTUAz/llKg== X-Received: by 2002:a05:6512:499:b0:46f:d419:a19b with SMTP id v25-20020a056512049900b0046fd419a19bmr3576799lfq.654.1650646284247; Fri, 22 Apr 2022 09:51:24 -0700 (PDT) Received: from otyshchenko.router ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id n2-20020a056512310200b0046e2f507a3asm279742lfb.167.2022.04.22.09.51.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Apr 2022 09:51:23 -0700 (PDT) From: Oleksandr Tyshchenko To: 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 Cc: Oleksandr Tyshchenko , Jason Wang , Rob Herring , Krzysztof Kozlowski , Julien Grall , Juergen Gross , Stefano Stabellini , "Michael S. Tsirkin" , Christoph Hellwig Subject: [PATCH V1 4/6] dt-bindings: Add xen, dev-domid property description for xen-grant DMA ops Date: Fri, 22 Apr 2022 19:51:01 +0300 Message-Id: <1650646263-22047-5-git-send-email-olekstysh@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1650646263-22047-1-git-send-email-olekstysh@gmail.com> References: <1650646263-22047-1-git-send-email-olekstysh@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_095126_779472_EE98A4BA X-CRM114-Status: GOOD ( 19.87 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 + +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 { + compatible = "virtio,mmio"; + reg = <0x3000 0x100>; + interrupts = <41>; + + /* The device is located in Xen domain with ID 1 */ + xen,dev-domid = <1>; + };