Originally, vhost-user-scsi did not implement a handle_output callback as that didn't seem necessary. Turns out it is.
Depending on which other devices are presented to a VM, SeaBIOS may decide to map vhost-user-scsi devices on the 64-bit range of the address space. As a result, SeaBIOS will kick VQs via the config space. Those land on Qemu (not the vhost backend) and are missed, causing the VM not to boot. This fixes the issue by getting Qemu to post the notification. Signed-off-by: Felipe Franciosi <[email protected]> --- hw/scsi/vhost-user-scsi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index 6a6c15dd32..13278ed151 100644 --- a/hw/scsi/vhost-user-scsi.c +++ b/hw/scsi/vhost-user-scsi.c @@ -62,8 +62,9 @@ static void vhost_user_scsi_set_status(VirtIODevice *vdev, uint8_t status) } } -static void vhost_dummy_handle_output(VirtIODevice *vdev, VirtQueue *vq) +static void vhost_handle_output(VirtIODevice *vdev, VirtQueue *vq) { + event_notifier_set(virtio_queue_get_host_notifier(vq)); } static void vhost_user_scsi_realize(DeviceState *dev, Error **errp) @@ -80,9 +81,9 @@ static void vhost_user_scsi_realize(DeviceState *dev, Error **errp) return; } - virtio_scsi_common_realize(dev, vhost_dummy_handle_output, - vhost_dummy_handle_output, - vhost_dummy_handle_output, &err); + virtio_scsi_common_realize(dev, vhost_handle_output, + vhost_handle_output, + vhost_handle_output, &err); if (err != NULL) { error_propagate(errp, err); return; -- 2.20.1
