Skip to content

Add VIRTIO_F_IN_ORDER support to vhost shadow virtqueue

Eugenio Pérez qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7virtio: Allow to fill a whole virtqueue in orderhw/virtio/virtio.c+1 -17 replies
2/7vhost: move svq next desc array to descs state structhw/virtio/vhost-shadow-virtqueue.c hw/virtio/vhost-shadow-virtqueue.h+12 -141 reply
3/7vhost: factor out the descriptor next fetchinghw/virtio/vhost-shadow-virtqueue.c+20 -41 reply
4/7vhost: factor out the get of last used desc in SVQhw/virtio/vhost-shadow-virtqueue.c+29 -161 reply
5/7vhost: factor out the detach buf logic in SVQhw/virtio/vhost-shadow-virtqueue.c+16 -84 replies
6/7vhost: add in_order feature to shadow virtqueuehw/virtio/vhost-shadow-virtqueue.c hw/virtio/vhost-shadow-virtqueue.h+160 -131 reply
7/7vhost: accept in order feature flaghw/virtio/vhost-shadow-virtqueue.c+1 -01 reply

Reviews trailers per patch

4 of 7 patches have a Reviewed-by or Acked-by.

PatchJason Wang
1/7
2/7A-b
3/7A-b
4/7
5/7
6/7A-b
7/7A-b

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

Read the v1 thread

Cover letter [PATCH 0/7] Add VIRTIO_F_IN_ORDER support to vhost shadow virtqueue

This series adds support for the VIRTIO_F_IN_ORDER feature flag to vhost shadow virtqueue (SVQ), enabling migration of vDPA devices that offer this feature. As SVQ acts as a virtio driver, the series follows the Linux kernel implementation for the feature by Jason Wang. This enables the live migration of vhost-vdpa devices that supports IN_ORDER.

The IN_ORDER feature allows virtio devices to use many descriptors in batch, just by marking the last one of the set as used.

The series is structured in three parts. First, max_steps calculation in virtqueue_ordered_fill is fixed to allow filling the entire virtqueue at once. Otherwise, a full queue cannot be used with just one used entry.

Afterwards, the series extracts helper functions for descriptor processing to prepare for in order changes:

Finally, the series adds IN_ORDER support, first adding conditional logic for in-order vs regular processing and whitelisting the feature flag in SVQ.

Eugenio Pérez (7):
virtio: Allow to fill a whole virtqueue in order
vhost: move svq next desc array to descs state struct
vhost: factor out the descriptor next fetching
vhost: factor out the get of last used desc in SVQ
vhost: factor out the detach buf logic in SVQ
vhost: add in_order feature to shadow virtqueue
vhost: accept in order feature flag

 hw/virtio/vhost-shadow-virtqueue.c | 215 +++++++++++++++++++++++++----
 hw/virtio/vhost-shadow-virtqueue.h |  38 ++++-
 hw/virtio/virtio.c                 |   2 +-
 3 files changed, 219 insertions(+), 36 deletions(-)
Signature · 1 line
2.53.0