[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221007064143.10049-3-jgross@suse.com>
Date: Fri, 7 Oct 2022 08:41:42 +0200
From: Juergen Gross <jgross@...e.com>
To: linux-kernel@...r.kernel.org
Cc: Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
xen-devel@...ts.xenproject.org
Subject: [PATCH v2 2/3] xen/virtio: use dom0 as default backend for CONFIG_XEN_VIRTIO_FORCE_GRANT
With CONFIG_XEN_VIRTIO_FORCE_GRANT set the default backend domid to 0,
enabling to use xen_grant_dma_ops for those devices.
Signed-off-by: Juergen Gross <jgross@...e.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
Acked-by: Stefano Stabellini <sstabellini@...nel.org>
---
drivers/xen/grant-dma-ops.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/xen/grant-dma-ops.c b/drivers/xen/grant-dma-ops.c
index 646ca913c05c..c703b77b33c9 100644
--- a/drivers/xen/grant-dma-ops.c
+++ b/drivers/xen/grant-dma-ops.c
@@ -349,6 +349,9 @@ void xen_grant_setup_dma_ops(struct device *dev)
if (dev->of_node) {
if (xen_dt_grant_init_backend_domid(dev, data))
goto err;
+ } else if (IS_ENABLED(CONFIG_XEN_VIRTIO_FORCE_GRANT)) {
+ dev_info(dev, "Using dom0 as backend\n");
+ data->backend_domid = 0;
} else {
/* XXX ACPI device unsupported for now */
goto err;
--
2.35.3
Powered by blists - more mailing lists