summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-07-06 14:54:47 +0100
committerMark Brown <broonie@kernel.org>2026-07-06 14:54:47 +0100
commit483cf36d8a9051d2fa87da2fc70cf407246db61f (patch)
tree35bb134ae7f0c9211910324de8984b002b645a68 /include/uapi
parent7f1caf43f2e1ba10bc5de119b0577b0f5a33c557 (diff)
parent1f673033c02735bb38ee2f16f1c86f042f4de9d4 (diff)
downloadlinux-next-483cf36d8a9051d2fa87da2fc70cf407246db61f.tar.gz
linux-next-483cf36d8a9051d2fa87da2fc70cf407246db61f.zip
Merge branch 'linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/vduse.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/uapi/linux/vduse.h b/include/uapi/linux/vduse.h
index 361eea511c21..8c616895c511 100644
--- a/include/uapi/linux/vduse.h
+++ b/include/uapi/linux/vduse.h
@@ -14,6 +14,12 @@
#define VDUSE_API_VERSION_1 1
+/* The VDUSE instance expects a request for vq ready */
+#define VDUSE_F_QUEUE_READY 0
+
+/* The VDUSE instance expects a request for suspend */
+#define VDUSE_F_SUSPEND 1
+
/*
* Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).
* This is used for future extension.
@@ -33,6 +39,7 @@
* @vq_align: the allocation alignment of virtqueue's metadata
* @ngroups: number of vq groups that VDUSE device declares
* @nas: number of address spaces that VDUSE device declares
+ * @vduse_features: VDUSE features
* @reserved: for future use, needs to be initialized to zero
* @config_size: the size of the configuration space
* @config: the buffer of the configuration space
@@ -49,7 +56,8 @@ struct vduse_dev_config {
__u32 vq_align;
__u32 ngroups; /* if VDUSE_API_VERSION >= 1 */
__u32 nas; /* if VDUSE_API_VERSION >= 1 */
- __u32 reserved[11];
+ __u64 vduse_features; /* if VDUSE_GET_FEATURES is not EINVAL */
+ __u32 reserved[9];
__u32 config_size;
__u8 config[];
};
@@ -63,6 +71,9 @@ struct vduse_dev_config {
*/
#define VDUSE_DESTROY_DEV _IOW(VDUSE_BASE, 0x03, char[VDUSE_NAME_MAX])
+/* Get the VDUSE supported features */
+#define VDUSE_GET_FEATURES _IOR(VDUSE_BASE, 0x04, __u64)
+
/* The ioctls for VDUSE device (/dev/vduse/$NAME) */
/**
@@ -325,6 +336,8 @@ enum vduse_req_type {
VDUSE_SET_STATUS,
VDUSE_UPDATE_IOTLB,
VDUSE_SET_VQ_GROUP_ASID,
+ VDUSE_SET_VQ_READY,
+ VDUSE_SUSPEND,
};
/**
@@ -373,6 +386,15 @@ struct vduse_iova_range_v2 {
};
/**
+ * struct vduse_vq_ready - Virtqueue ready request message
+ * @num: Virtqueue number
+ */
+struct vduse_vq_ready {
+ __u32 num;
+ __u32 ready;
+};
+
+/**
* struct vduse_dev_request - control request
* @type: request type
* @request_id: request id
@@ -382,6 +404,7 @@ struct vduse_iova_range_v2 {
* @iova: IOVA range for updating
* @iova_v2: IOVA range for updating if API_VERSION >= 1
* @vq_group_asid: ASID of a virtqueue group
+ * @vq_ready: Virtqueue ready request
* @padding: padding
*
* Structure used by read(2) on /dev/vduse/$NAME.
@@ -399,6 +422,10 @@ struct vduse_dev_request {
*/
struct vduse_iova_range_v2 iova_v2;
struct vduse_vq_group_asid vq_group_asid;
+
+ /* Only if VDUSE_F_QUEUE_READY is negotiated */
+ struct vduse_vq_ready vq_ready;
+
__u32 padding[32];
};
};