qemu-e2k/hw/virtio
Kevin Wolf 2c66de61f8 vdpa-dev: Fix initialisation order to restore VDUSE compatibility
VDUSE requires that virtqueues are first enabled before the DRIVER_OK
status flag is set; with the current API of the kernel module, it is
impossible to enable the opposite order in our block export code because
userspace is not notified when a virtqueue is enabled.

This requirement also mathces the normal initialisation order as done by
the generic vhost code in QEMU. However, commit 6c482547 accidentally
changed the order for vdpa-dev and broke access to VDUSE devices with
this.

This changes vdpa-dev to use the normal order again and use the standard
vhost callback .vhost_set_vring_enable for this. VDUSE devices can be
used with vdpa-dev again after this fix.

vhost_net intentionally avoided enabling the vrings for vdpa and does
this manually later while it does enable them for other vhost backends.
Reflect this in the vhost_net code and return early for vdpa, so that
the behaviour doesn't change for this device.

Cc: qemu-stable@nongnu.org
Fixes: 6c4825476a ('vdpa: move vhost_vdpa_set_vring_ready to the caller')
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20240315155949.86066-1-kwolf@redhat.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-03-26 14:21:26 +01:00
..
Kconfig hw/virtio: add vhost-user-snd and vhost-user-snd-pci devices 2024-02-14 06:09:03 -05:00
meson.build hw/virtio: Move vhost-user-input into virtio folder 2024-02-14 06:09:32 -05:00
trace-events vdpa-dev: Fix initialisation order to restore VDUSE compatibility 2024-03-26 14:21:26 +01:00
trace.h
vdpa-dev-pci.c
vdpa-dev.c vdpa-dev: Fix initialisation order to restore VDUSE compatibility 2024-03-26 14:21:26 +01:00
vhost-backend.c vhost: Add worker backend callouts 2023-12-25 11:34:55 -05:00
vhost-iova-tree.c
vhost-iova-tree.h
vhost-scsi-pci.c
vhost-shadow-virtqueue.c
vhost-shadow-virtqueue.h
vhost-stub.c
vhost-user-base.c hw/virtio: Support set_config() callback in vhost-user-base 2024-02-14 06:09:32 -05:00
vhost-user-blk-pci.c
vhost-user-device-pci.c virtio: split into vhost-user-base and vhost-user-device 2024-02-14 06:01:39 -05:00
vhost-user-device.c virtio: split into vhost-user-base and vhost-user-device 2024-02-14 06:01:39 -05:00
vhost-user-fs-pci.c
vhost-user-fs.c hw/virtio: Constify VMState 2023-12-30 07:38:06 +11:00
vhost-user-gpio-pci.c
vhost-user-gpio.c hw/virtio: derive vhost-user-gpio from vhost-user-base 2024-02-14 06:01:44 -05:00
vhost-user-i2c-pci.c
vhost-user-i2c.c hw/virtio: derive vhost-user-i2c from vhost-user-base 2024-02-14 06:01:49 -05:00
vhost-user-input-pci.c hw/virtio: derive vhost-user-input from vhost-user-base 2024-02-14 06:09:32 -05:00
vhost-user-input.c hw/virtio: derive vhost-user-input from vhost-user-base 2024-02-14 06:09:32 -05:00
vhost-user-rng-pci.c
vhost-user-rng.c hw/virtio: derive vhost-user-rng from vhost-user-base 2024-02-14 06:01:42 -05:00
vhost-user-scmi-pci.c
vhost-user-scmi.c bulk: Access existing variables initialized to &S->F when available 2024-03-12 11:46:16 +01:00
vhost-user-scsi-pci.c
vhost-user-snd-pci.c hw/virtio: add vhost-user-snd and vhost-user-snd-pci devices 2024-02-14 06:09:03 -05:00
vhost-user-snd.c hw/virtio: add vhost-user-snd and vhost-user-snd-pci devices 2024-02-14 06:09:03 -05:00
vhost-user-vsock-pci.c
vhost-user-vsock.c
vhost-user.c virtio,pc,pci: features, cleanups, fixes 2024-03-13 15:11:53 +00:00
vhost-vdpa.c vdpa-dev: Fix initialisation order to restore VDUSE compatibility 2024-03-26 14:21:26 +01:00
vhost-vsock-common.c
vhost-vsock-pci.c
vhost-vsock.c hw/virtio/vhost-vsock: Fix missing ERRP_GUARD() for error_prepend() 2024-03-12 11:45:45 +01:00
vhost.c vdpa-dev: Fix initialisation order to restore VDUSE compatibility 2024-03-26 14:21:26 +01:00
virtio-9p-pci.c
virtio-acpi.c acpi: Clean up includes 2024-01-30 21:20:20 +03:00
virtio-balloon-pci.c
virtio-balloon.c migration: remove migration.h references 2024-03-11 16:28:59 -04:00
virtio-blk-pci.c
virtio-bus.c
virtio-config-io.c
virtio-crypto-pci.c
virtio-crypto.c hw/virtio: Constify VMState 2023-12-30 07:38:06 +11:00
virtio-hmp-cmds.c
virtio-input-host-pci.c
virtio-input-pci.c
virtio-iommu-pci.c hw/virtio: Free VirtIOIOMMUPCI::vdev.reserved_regions[] on finalize() 2023-11-27 15:27:41 +00:00
virtio-iommu.c virtio-iommu: Add an option to define the input range width 2024-03-12 17:58:42 -04:00
virtio-md-pci.c
virtio-mem-pci.c
virtio-mem-pci.h
virtio-mem.c oslib-posix: initialize backend memory objects in parallel 2024-02-06 08:15:22 +01:00
virtio-mmio.c hw/virtio: Constify VMState 2023-12-30 07:38:06 +11:00
virtio-net-pci.c
virtio-pci.c virtio,pc,pci: features, cleanups, fixes 2024-03-13 15:11:53 +00:00
virtio-pmem-pci.c
virtio-pmem-pci.h
virtio-pmem.c Revert "hw/virtio/virtio-pmem: Replace impossible check by assertion" 2023-11-06 13:53:59 +01:00
virtio-qmp.c
virtio-qmp.h
virtio-rng-pci.c
virtio-rng.c hw/virtio: Constify VMState 2023-12-30 07:38:06 +11:00
virtio-scsi-pci.c
virtio-serial-pci.c
virtio-stub.c
virtio.c hw/virtio: Add support for VDPA network simulation devices 2024-03-12 17:56:55 -04:00