From: "Eugenio Pérez" <eperezma@redhat.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Yongji Xie <xieyongji@bytedance.com>,
david.marchand@redhat.com, dev@dpdk.org, mst@redhat.com,
jasowangio@gmail.com, chenbox@nvidia.com
Subject: [RFC v4 08/11] uapi: Align vduse.h for enable and suspend VDUSE messages
Date: Tue, 7 Jul 2026 14:45:04 +0200 [thread overview]
Message-ID: <20260707124507.251729-9-eperezma@redhat.com> (raw)
In-Reply-To: <20260707124507.251729-1-eperezma@redhat.com>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
This is a prerequisite for next patches to use them.
These features are required to properly support live migration and proper
device initialization ordering.
These are not in maintainer's branch at the moment:
https://lore.kernel.org/lkml/20260310190759.1097506-1-eperezma@redhat.com
https://lore.kernel.org/lkml/20260310191019.1099757-1-eperezma@redhat.com
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
kernel/linux/uapi/linux/vduse.h | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/kernel/linux/uapi/linux/vduse.h b/kernel/linux/uapi/linux/vduse.h
index 361eea511c21..b7f8c04a0a44 100644
--- a/kernel/linux/uapi/linux/vduse.h
+++ b/kernel/linux/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.
@@ -63,6 +69,12 @@ 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)
+
+/* Set the VDUSE features */
+#define VDUSE_SET_FEATURES _IOW(VDUSE_BASE, 0x05, __u64)
+
/* The ioctls for VDUSE device (/dev/vduse/$NAME) */
/**
@@ -325,6 +337,8 @@ enum vduse_req_type {
VDUSE_SET_STATUS,
VDUSE_UPDATE_IOTLB,
VDUSE_SET_VQ_GROUP_ASID,
+ VDUSE_SET_VQ_READY,
+ VDUSE_SUSPEND,
};
/**
@@ -372,6 +386,15 @@ struct vduse_iova_range_v2 {
__u32 padding;
};
+/**
+ * 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
@@ -382,6 +405,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 +423,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];
};
};
--
2.55.0
next prev parent reply other threads:[~2026-07-07 12:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 12:44 [RFC v4 00/11] Add vduse live migration features Eugenio Pérez
2026-07-07 12:44 ` [RFC v4 01/11] uapi: align VDUSE header for ASID Eugenio Pérez
2026-07-07 12:44 ` [RFC v4 02/11] vhost: introduce ASID support Eugenio Pérez
2026-07-07 12:44 ` [RFC v4 03/11] vhost: add VDUSE API version negotiation Eugenio Pérez
2026-07-07 12:45 ` [RFC v4 04/11] vhost: add virtqueues groups support to VDUSE Eugenio Pérez
2026-07-07 12:45 ` [RFC v4 05/11] vhost: add ASID support to VDUSE IOTLB operations Eugenio Pérez
2026-07-07 12:45 ` [RFC v4 06/11] vhost: claim VDUSE support for API version 1 Eugenio Pérez
2026-07-07 12:45 ` [RFC v4 07/11] vhost: add net status feature to VDUSE Eugenio Pérez
2026-07-07 12:45 ` Eugenio Pérez [this message]
2026-07-07 12:45 ` [RFC v4 09/11] vhost: Support VDUSE QUEUE_READY feature Eugenio Pérez
2026-07-07 12:45 ` [RFC v4 10/11] vhost: Support vduse suspend feature Eugenio Pérez
2026-07-07 12:45 ` [RFC v4 11/11] doc: add release notes for VDUSE live migration support Eugenio Pérez
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=20260707124507.251729-9-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=chenbox@nvidia.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jasowangio@gmail.com \
--cc=maxime.coquelin@redhat.com \
--cc=mst@redhat.com \
--cc=xieyongji@bytedance.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.