diff options
author | Juergen Gross <jgross@suse.com> | 2022-08-29 13:26:08 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2022-10-07 16:39:03 +0200 |
commit | 7228113d1fa0107a377aef71094d610eb8824aa2 (patch) | |
tree | 38eb47a51c87c14ab78703da3c4974fd42846034 /drivers | |
parent | c9133112f347907774055bbf73179a7ff8504689 (diff) |
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@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/xen/grant-dma-ops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/grant-dma-ops.c b/drivers/xen/grant-dma-ops.c index 7133272918f0..3e4c590896d0 100644 --- a/drivers/xen/grant-dma-ops.c +++ b/drivers/xen/grant-dma-ops.c @@ -365,6 +365,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; |