[PATCH 0/5] virtio: allow virtio_error() in IOThreads

Stefan Hajnoczi posted 5 patches 5 days, 16 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250922220149.498967-1-stefanha@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, Stefano Garzarella <sgarzare@redhat.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
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(-)
[PATCH 0/5] virtio: allow virtio_error() in IOThreads
Posted by Stefan Hajnoczi 5 days, 16 hours ago
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