The hw/virtio/ code calls virtio_error() when the guest driver does something invalid. virtio_error() is currently not usable outside the Big QEMU Lock (BQL) because it calls into the interrupt code path (MSI, etc) that requires the BQL.
Make the hw/virtio.c code aware of the IOThread case where the BQL is not held and use irqfd there. This makes virtio_error() available to IOThreads. Stefan Hajnoczi (5): vhost: use virtio_config_get_guest_notifier() virtio: unify virtio_notify_irqfd() and virtio_notify() virtio: support irqfd in virtio_notify_config() tests/libqos: extract qvirtqueue_set_avail_idx() tests/virtio-scsi: add a virtio_error() IOThread test include/hw/virtio/virtio.h | 1 - tests/qtest/libqos/virtio.h | 2 ++ hw/block/virtio-blk.c | 6 +----- hw/scsi/virtio-scsi.c | 6 +----- hw/virtio/vhost.c | 11 +++++++---- hw/virtio/virtio.c | 35 ++++++++++++++++++---------------- tests/qtest/libqos/virtio.c | 16 ++++++++++++---- tests/qtest/virtio-scsi-test.c | 32 +++++++++++++++++++++++++++++++ hw/virtio/trace-events | 1 - 9 files changed, 74 insertions(+), 36 deletions(-) -- 2.51.0
