Skip to content

virtio: enable VIRTIO_F_RING_PACKED for all devices

Stefan Hajnoczi qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 11 repliesIn review
  2. v15 patches 14 repliesSuperseded

Changes in v2 from the cover letter

* Add libvhost-user VHOST_USER_GET_FEATURES patch to start reporting feature bits correctly (already reviewed by Marc-André Lureau)
* Rephrase doc comments and drop vhost_get_default_features() [Jason]
* Simplify hw/core/machine.c compat props by setting packed=off on the virtio-dev base class [Jason]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7tests/libqos: mask out VIRTIO_F_RING_PACKED for nowtests/qtest/libqos/virtio.c+2 -10 replies
2/7libvhost-user: advertise vring featurescontrib/libvhost-user/libvhost-user.c contrib/vhost-user-blk/vhost-user-blk.c+11 -30 replies
3/7docs: document non-net VHOST_USER_GET_FEATURES behaviordocs/interop/vhost-user.rst+21 -02 replies
4/7vhost: involve device backends in feature negotiationbackends/cryptodev-vhost.c hw/display/vhost-user-gpu.c hw/display/virtio-gpu-base.c +8 more+100 -68 replies
5/7vhost-user-blk: add VIRTIO_F_RING_PACKED feature bithw/block/vhost-user-blk.c+1 -00 replies
6/7vhost-scsi: add VIRTIO_F_VERSION_1 and VIRTIO_F_RING_PACKEDhw/scsi/vhost-scsi.c hw/scsi/vhost-user-scsi.c+4 -00 replies
7/7virtio: enable VIRTIO_F_RING_PACKED for all deviceshw/core/machine.c include/hw/virtio/virtio.h+4 -20 replies

Reviews trailers per patch

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

PatchThomas HuthRaphael NorwitzMarc-André Lureau
1/7A-b
2/7R-b
3/7
4/7
5/7R-b
6/7R-b
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/7] virtio: enable VIRTIO_F_RING_PACKED for all devices

v2:
* Add libvhost-user VHOST_USER_GET_FEATURES patch to start reporting feature bits correctly (already reviewed by Marc-André Lureau)
* Rephrase doc comments and drop vhost_get_default_features() [Jason]
* Simplify hw/core/machine.c compat props by setting packed=off on the virtio-dev base class [Jason]

The VIRTIO 1.1 packed virtqueue layout improves performance and guest driver support has been available since Linux v5.0. virtio-blk benchmarks show it is beneficial for non-net devices too so I wrote patches to enable it for all devices.

It turned out to be trickier than I expected because vhost feature negotiation is currently not ready for new virtqueue feature bits like VIRTIO_F_RING_PACKED.

Patch 1 fixes libqos. Patch 2 fixes libvhost-user. Patch 3 adds clarifications to the vhost-user specification. Patches 4-6 solve the vhost feature issues in QEMU. Finally, Patch 6 enables packed virtqueues.

Stefan Hajnoczi (7):
tests/libqos: mask out VIRTIO_F_RING_PACKED for now
libvhost-user: advertise vring features
docs: document non-net VHOST_USER_GET_FEATURES behavior
vhost: involve device backends in feature negotiation
vhost-user-blk: add VIRTIO_F_RING_PACKED feature bit
vhost-scsi: add VIRTIO_F_VERSION_1 and VIRTIO_F_RING_PACKED
virtio: enable VIRTIO_F_RING_PACKED for all devices

 include/hw/virtio/vhost.h               |  1 +
 include/hw/virtio/virtio-gpu.h          |  2 ++
 include/hw/virtio/virtio.h              |  2 +-
 include/sysemu/cryptodev-vhost.h        | 11 +++++++++++
 backends/cryptodev-vhost.c              | 21 +++++++++++++++++++++
 contrib/libvhost-user/libvhost-user.c   | 10 ++++++++++
 contrib/vhost-user-blk/vhost-user-blk.c |  4 +---
 hw/block/vhost-user-blk.c               |  1 +
 hw/core/machine.c                       |  4 +++-
 hw/display/vhost-user-gpu.c             | 18 ++++++++++++++++++
 hw/display/virtio-gpu-base.c            |  2 +-
 hw/input/vhost-user-input.c             | 11 +++++++++++
 hw/scsi/vhost-scsi.c                    |  2 ++
 hw/scsi/vhost-user-scsi.c               |  2 ++
 hw/virtio/vhost-user-fs.c               |  6 ++++--
 hw/virtio/vhost-vsock.c                 |  7 +++++--
 hw/virtio/vhost.c                       | 24 ++++++++++++++++++++++++
 hw/virtio/virtio-crypto.c               |  3 ++-
 tests/qtest/libqos/virtio.c             |  3 ++-
 docs/interop/vhost-user.rst             | 21 +++++++++++++++++++++
 20 files changed, 143 insertions(+), 12 deletions(-)
Signature · 1 line
2.26.2