Skip to content

RFC virtio: early detect 'modern' virtio

Halil Pasic qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest5 patches 9 repliesIn review
  2. v1 RFC3 patches 6 repliesSuperseded

Changes in v2 from the cover letter

* add callback
* tweak feature manipulation
* add generic handling for vhost that needs to be called by devices
* add handling for virtio

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5virtio: introduce virtio_force_modern()hw/virtio/virtio.c include/hw/virtio/virtio.h+15 -04 replies
2/5virtio-ccw: use virtio_force_modern()hw/s390x/virtio-ccw.c+3 -00 replies
3/5virtio-pci: use virtio_force_modern()hw/virtio/virtio-pci.c+1 -00 replies
4/5vhost: push features to backend on force_modernhw/virtio/vhost.c include/hw/virtio/vhost.h+19 -00 replies
5/5virtio-net: handle force_modern for vhosthw/net/virtio-net.c+20 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/5] virtio: early detect 'modern' virtio

This is an early RFC for a transport specific early detecton of modern virtio, which is most relevant for transitional devices on big endian platforms, when drivers access the config space before FEATURES_OK is set.

The most important part that is missing here is fixing all the problems that arise in the situation described in the previous paragraph, when the config is managed by a vhost device (and thus outside QEMU. This series tackles this problem only for virtio_net+vhost as an example. If this approach is deemed good, we need to do something very similar for every single affected device.

This series was only lightly tested. The vhost stuff is entirely untested, unfortunately I don't have a working setup where this handling would be needed (because the config space is handled in the device). DPDK is not supported on s390x so at the moment I can't test DPDK based setups.

v1 -> v2:

* add callback
* tweak feature manipulation
* add generic handling for vhost that needs to be called by devices
* add handling for virtio

Halil Pasic (5):
virtio: introduce virtio_force_modern()
virtio-ccw: use virtio_force_modern()
virtio-pci: use virtio_force_modern()
vhost: push features to backend on force_modern
virtio-net: handle force_modern for vhost

 hw/net/virtio-net.c        | 20 ++++++++++++++++++++
 hw/s390x/virtio-ccw.c      |  3 +++
 hw/virtio/vhost.c          | 17 +++++++++++++++++
 hw/virtio/virtio-pci.c     |  1 +
 hw/virtio/virtio.c         | 13 +++++++++++++
 include/hw/virtio/vhost.h  |  2 ++
 include/hw/virtio/virtio.h |  2 ++
 7 files changed, 58 insertions(+)

base-commit: 2c3e83f92d93fbab071b8a96b8ab769b01902475

Signature · 1 line
2.25.1