From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
xen-devel@lists.xenproject.org
Subject: [PATCH 2/3] xen/virtio: use dom0 as default backend for CONFIG_XEN_VIRTIO_FORCE_GRANT
Date: Thu, 6 Oct 2022 09:14:59 +0200 [thread overview]
Message-ID: <20221006071500.15689-3-jgross@suse.com> (raw)
In-Reply-To: <20221006071500.15689-1-jgross@suse.com>
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>
---
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 f29759d5301f..a00112235877 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_setup_dma_ops(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
next prev parent reply other threads:[~2022-10-06 7:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 7:14 [PATCH 0/3] xen/virtio: support grant based virtio on x86 Juergen Gross
2022-10-06 7:14 ` [PATCH 1/3] xen/virtio: restructure xen grant dma setup Juergen Gross
2022-10-06 16:35 ` Oleksandr Tyshchenko
2022-10-07 0:23 ` Stefano Stabellini
2022-10-07 4:35 ` Juergen Gross
2022-10-06 7:14 ` Juergen Gross [this message]
2022-10-06 17:23 ` [PATCH 2/3] xen/virtio: use dom0 as default backend for CONFIG_XEN_VIRTIO_FORCE_GRANT Oleksandr Tyshchenko
2022-10-07 0:23 ` Stefano Stabellini
2022-10-06 7:15 ` [PATCH 3/3] xen/virtio: enable grant based virtio on x86 Juergen Gross
2022-10-06 16:04 ` Oleksandr Tyshchenko
2022-10-07 4:31 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221006071500.15689-3-jgross@suse.com \
--to=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksandr_tyshchenko@epam.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®