Skip to content

Add vduse live migration features

Eugenio Pérez dpdk-dev 8 versions – Applied

Status from this message: applied to next-virtio/for-next-net.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 3 repliesApplied
  2. v4 posting 2/29 patches 1 replySuperseded
  3. v3 posting 2/29 patches 13 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v2 posting 2/211 patches2 repliesSuperseded
v4 RFC posting 1/211 patches0 repliesSuperseded
v3 RFC posting 1/210 patches1 replySuperseded
v2 RFC posting 1/210 patches0 repliesSuperseded
v1 RFC10 patches0 repliesSuperseded

Changes in v5 from the cover letter

* Update headers to 7.3
* Rebase on top of main, merge conflicts.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/9uapi: import VDUSE and VFIO header from v7.3 kernelkernel/linux/uapi/linux/iommufd.h kernel/linux/uapi/linux/stddef.h kernel/linux/uapi/linux/vduse.h +2 more+261 -141 reply
2/9vhost: introduce ASID supportlib/vhost/iotlb.c lib/vhost/iotlb.h lib/vhost/vduse.c +3 more+177 -1211 reply
3/9vhost: add VDUSE API version negotiationlib/vhost/vduse.c lib/vhost/vhost.h+13 -20 replies
4/9vhost: add virtqueues groups support to VDUSElib/vhost/vduse.c+52 -20 replies
5/9vhost: add ASID support to VDUSE IOTLB operationslib/vhost/vduse.c+39 -120 replies
6/9vhost: claim VDUSE support for API version 1lib/vhost/vduse.c+1 -10 replies
7/9vhost: add net status feature to VDUSElib/vhost/vduse.c lib/vhost/vduse.h+3 -10 replies
8/9vhost: Support VDUSE QUEUE_READY featurelib/vhost/vduse.c lib/vhost/vhost.h+88 -20 replies
9/9vhost: Support vduse suspend featurelib/vhost/vduse.c lib/vhost/vhost.h+45 -10 replies

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by.

PatchMaxime Coquelin
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/9] Add vduse live migration features

This series introduces features to the VDUSE (vDPA Device in Userspace) driver to support Live Migration.

Currently, DPDK does not support VDUSE devices live migration because the driver lacks a mechanism to suspend the device and quiesce the rings to initiate the switchover. This series implements the suspend operation to address this limitation.

Furthermore, enabling Live Migration for devices with control virtqueue requires two additional features. Both of them are included in this series.

* Address Spaces ID (ASID) support: This allows QEMU to isolate and intercept the device's CVQ. By doing so, QEMU is able to migrate the device status transparently, without requiring the device to support state save and restore.
* QUEUE_READY: This allows QEMU to control when the dataplane virtqueues are enabled. This ensures the dataplane is started after the device configuration has been fully restored via the CVQ.

It also enables the VIRTIO_NET_F_STATUS feature. This allows the device to signal the driver that it needs to send gratuitous ARP with VIRTIO_NET_S_ANNOUNCE, reducing the Live Migration downtime.

v5:
* Update headers to 7.3
* Rebase on top of main, merge conflicts.

v4:
* Rebase on top of origin/main, which already includes the __counted_by error fix.
* Add VDUSE_SUSPEND to lib/vhost/vduse.c:vduse_reqs_str (Maxime).

v3:
* Include uapi/linux/stddef.h and revert the -D__counted_by from v2.

v2:
* Add -D__counted_by(X)= if the compiler does not support it. It is pulled by the kernel headers.

PATCH v1:
* Move to VDUSE_SET_FEATURES ioctl instead of config space field.
* Add a few bounds control.
* Update kernel headers to v7.3-rc3.

RFC v4:
* Sync headers with Linux's latest existing and proposed UAPI. Both files constants and new ioctl VDUSE_SET_FEATURES.
* Check for more error conditions and clarified some error messages in ready message processing.
* Add relevant release notes.
* Fix cosmetic whitespaces & checkpath errors.
* Fix error path of vhost_user_iotlb_init and vhost_user_iotlb_init_one.
* Fix commits author.

RFC v3:
* Replace incorrect '%lx' DEBUG print format specifier with PRIx64

RFC v2:
* Following latest comments on kernel series about VDUSE features, not checking API version but only check if VDUSE_GET_FEATURES success.
* Move the start and last declarations in the braces as gcc 8 does not like them interleaved with statements. Actually, I think the move was a mistake in the first version.
https://mails.dpdk.org/archives/test-report/2026-February/958175.html

Eugenio Pérez (3):
uapi: import VDUSE and VFIO header from v7.3 kernel
vhost: Support VDUSE QUEUE_READY feature
vhost: Support vduse suspend feature

Maxime Coquelin (6):
vhost: introduce ASID support
vhost: add VDUSE API version negotiation
vhost: add virtqueues groups support to VDUSE
vhost: add ASID support to VDUSE IOTLB operations
vhost: claim VDUSE support for API version 1
vhost: add net status feature to VDUSE

 kernel/linux/uapi/linux/iommufd.h | 105 +++++++++++-
 kernel/linux/uapi/linux/stddef.h  |   4 +
 kernel/linux/uapi/linux/vduse.h   | 113 ++++++++++++-
 kernel/linux/uapi/linux/vfio.h    |  51 +++++-
 kernel/linux/uapi/version         |   2 +-
 lib/vhost/iotlb.c                 | 233 +++++++++++++++++----------
 lib/vhost/iotlb.h                 |  14 +-
 lib/vhost/vduse.c                 | 259 +++++++++++++++++++++++++++---
 lib/vhost/vduse.h                 |   3 +-
 lib/vhost/vhost.c                 |  16 +-
 lib/vhost/vhost.h                 |  16 +-
 lib/vhost/vhost_user.c            |  13 +-
 12 files changed, 676 insertions(+), 153 deletions(-)
Signature · 1 line
2.56.0