summaryrefslogtreecommitdiff
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2026-07-07 14:25:00 +0200
committerMichael S. Tsirkin <mst@redhat.com>2026-08-19 06:38:48 -0400
commita596238c2ab6944861404dc597133ffd4ad062d5 (patch)
tree0e7d5dfabba4005ddf7e6a29bd886ecd64b97406 /drivers/vdpa
parent0ff906166f00ac7b2ccc36c57be6ad4be0dd9e90 (diff)
downloadlinux-next-a596238c2ab6944861404dc597133ffd4ad062d5.tar.gz
linux-next-a596238c2ab6944861404dc597133ffd4ad062d5.zip
vduse: add VDUSE_GET_FEATURES ioctl
Add an ioctl to allow VDUSE instances to query the available features supported by the kernel module. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260707122502.239022-3-eperezma@redhat.com>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r--drivers/vdpa/vdpa_user/vduse_dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index 861a8093daa0..f3f24cc59eb0 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -51,6 +51,9 @@
#define IRQ_UNBOUND -1
+/* Supported VDUSE features */
+static const uint64_t vduse_features;
+
/*
* VDUSE instance have not asked the vduse API version, so assume 0.
*
@@ -2342,6 +2345,10 @@ static long vduse_ioctl(struct file *file, unsigned int cmd,
ret = vduse_destroy_dev(name);
break;
}
+ case VDUSE_GET_FEATURES:
+ ret = put_user(vduse_features, (u64 __user *)argp);
+ break;
+
default:
ret = -EINVAL;
break;