summaryrefslogtreecommitdiff
path: root/drivers/xen/gntdev-dmabuf.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2025-08-26 16:56:08 +0200
committerJuergen Gross <jgross@suse.com>2025-09-08 17:01:36 +0200
commit2ea7a5bcc4cfca817b3502b38f97885767730ed8 (patch)
treee9e626cadcc19dc5e2e5dc2410fee50b34f70416 /drivers/xen/gntdev-dmabuf.c
parent0f4283123fe1e6016296048d0fdcfce615047a13 (diff)
drivers/xen/gntdev: use xen_pv_domain() instead of cached value
Eliminate the use_ptemod variable by replacing its use cases with xen_pv_domain(). Instead of passing the xen_pv_domain() return value to gntdev_ioctl_dmabuf_exp_from_refs(), use xen_pv_domain() in that function. Reviewed-by: Jason Andryuk <jason.andryuk@amd.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20250826145608.10352-4-jgross@suse.com>
Diffstat (limited to 'drivers/xen/gntdev-dmabuf.c')
-rw-r--r--drivers/xen/gntdev-dmabuf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c
index 82855105ab85..550980dd3b0b 100644
--- a/drivers/xen/gntdev-dmabuf.c
+++ b/drivers/xen/gntdev-dmabuf.c
@@ -720,16 +720,15 @@ static void dmabuf_imp_release_all(struct gntdev_dmabuf_priv *priv)
/* DMA buffer IOCTL support. */
-long gntdev_ioctl_dmabuf_exp_from_refs(struct gntdev_priv *priv, int use_ptemod,
+long gntdev_ioctl_dmabuf_exp_from_refs(struct gntdev_priv *priv,
struct ioctl_gntdev_dmabuf_exp_from_refs __user *u)
{
struct ioctl_gntdev_dmabuf_exp_from_refs op;
u32 *refs;
long ret;
- if (use_ptemod) {
- pr_debug("Cannot provide dma-buf: use_ptemode %d\n",
- use_ptemod);
+ if (xen_pv_domain()) {
+ pr_debug("Cannot provide dma-buf in a PV domain\n");
return -EINVAL;
}