qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] virtio: allow virtio_error() in IOThreads
@ 2025-09-22 22:01 Stefan Hajnoczi
  2025-09-22 22:01 ` [PATCH 1/5] vhost: use virtio_config_get_guest_notifier() Stefan Hajnoczi
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2025-09-22 22:01 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael S. Tsirkin, qemu-block, Hanna Reitz,
	Laurent Vivier, Fam Zheng, Fabiano Rosas, Paolo Bonzini,
	Stefan Hajnoczi, Stefano Garzarella

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-23 13:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 22:01 [PATCH 0/5] virtio: allow virtio_error() in IOThreads Stefan Hajnoczi
2025-09-22 22:01 ` [PATCH 1/5] vhost: use virtio_config_get_guest_notifier() Stefan Hajnoczi
2025-09-23  8:33   ` Philippe Mathieu-Daudé
2025-09-22 22:01 ` [PATCH 2/5] virtio: unify virtio_notify_irqfd() and virtio_notify() Stefan Hajnoczi
2025-09-23  8:41   ` Philippe Mathieu-Daudé
2025-09-22 22:01 ` [PATCH 3/5] virtio: support irqfd in virtio_notify_config() Stefan Hajnoczi
2025-09-22 22:01 ` [PATCH 4/5] tests/libqos: extract qvirtqueue_set_avail_idx() Stefan Hajnoczi
2025-09-23  8:45   ` Philippe Mathieu-Daudé
2025-09-23 13:07   ` Fabiano Rosas
2025-09-22 22:01 ` [PATCH 5/5] tests/virtio-scsi: add a virtio_error() IOThread test Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).