qemu-cr16/include/hw/virtio
Stefan Hajnoczi 1e9181dc52 virtio: unify virtio_notify_irqfd() and virtio_notify()
The difference between these two functions:
- virtio_notify() uses the interrupt code path (MSI or classic IRQs)
- virtio_notify_irqfd() uses guest notifiers (irqfds)

virtio_notify() can only be called with the BQL held because the
interrupt code path requires the BQL. Device models use
virtio_notify_irqfd() from IOThreads since the BQL is not held.

The two functions can be unified by pushing down the if
(qemu_in_iothread()) check from virtio-blk and virtio-scsi into core
virtio code. This is in preparation for the next commit that will add
irqfd support to virtio_notify_config() and where it's unattractive to
introduce another irqfd-only API for device model callers.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20250922220149.498967-3-stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-10-05 09:01:08 -04:00
..
cbor-helpers.h device/virtio-nsm: Support for Nitro Secure Module device 2024-10-31 18:28:32 +01:00
iothread-vq-mapping.h virtio: extract iothread-vq-mapping.h API 2025-03-13 17:57:23 +01:00
vdpa-dev.h vdpa: add vdpa-dev support 2022-12-21 06:35:28 -05:00
vhost-backend.h vhost: add support for negotiating extended features 2025-10-04 10:50:37 -04:00
vhost-scsi-common.h vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
vhost-scsi.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
vhost-user-base.h hw/virtio: rename vhost-user-device and make user creatable 2025-10-05 09:01:08 -04:00
vhost-user-blk.h vhost-user-blk: add an option to skip GET_VRING_BASE for force shutdown 2025-07-14 09:16:40 -04:00
vhost-user-fs.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
vhost-user-gpio.h hw/virtio: derive vhost-user-gpio from vhost-user-base 2024-02-14 06:01:44 -05:00
vhost-user-i2c.h hw/virtio: derive vhost-user-i2c from vhost-user-base 2024-02-14 06:01:49 -05:00
vhost-user-rng.h hw/virtio: derive vhost-user-rng from vhost-user-base 2024-02-14 06:01:42 -05:00
vhost-user-scmi.h hw/virtio: Add a protection against duplicate vu_scmi_stop calls 2023-08-03 16:06:49 -04:00
vhost-user-scsi.h vhost-user-scsi: support reconnect to backend 2023-10-22 05:18:17 -04:00
vhost-user-snd.h hw/virtio: add vhost-user-snd and vhost-user-snd-pci devices 2024-02-14 06:09:03 -05:00
vhost-user-vsock.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
vhost-user.h virtio/vhost-user: fix qemu abort when hotunplug vhost-user-net device 2024-11-04 16:03:24 -05:00
vhost-vdpa.h vdpa: move iova_tree allocation to net_vhost_vdpa_init 2025-06-02 14:29:15 -04:00
vhost-vsock-common.h vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
vhost-vsock.h vhost-vsock: handle common features in vhost-vsock-common 2021-10-05 17:30:57 -04:00
vhost.h vhost: add support for negotiating extended features 2025-10-04 10:50:37 -04:00
virtio-access.h Replace TARGET_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
virtio-acpi.h license: Update deprecated SPDX tag GPL-2.0+ to GPL-2.0-or-later 2024-09-20 10:11:59 +03:00
virtio-balloon.h hw/virtio: reset virtio balloon stats on machine reset 2025-02-21 07:18:42 -05:00
virtio-blk-common.h virtio-blk: move config size params to virtio-blk-common 2022-10-07 09:41:51 -04:00
virtio-blk.h hw/vmapple/virtio-blk: Add support for apple virtio-blk 2025-03-04 14:45:34 +01:00
virtio-bus.h virtio-bus: introduce iommu_enabled() 2021-09-04 16:35:17 -04:00
virtio-crypto.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
virtio-dmabuf.h hw/display: introduce virtio-dmabuf 2023-10-04 18:15:06 -04:00
virtio-features.h virtio: introduce extended features type 2025-10-04 10:50:37 -04:00
virtio-gpu-bswap.h virtio-gpu: blob prep 2023-10-16 11:29:56 +04:00
virtio-gpu-pci.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
virtio-gpu-pixman.h
virtio-gpu.h hw/display: Allow injection of virtio-gpu EDID name 2025-07-15 10:22:33 +04:00
virtio-input.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
virtio-iommu.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
virtio-md-pci.h virtio-md-pci: Support unplug requests for compatible devices 2023-07-12 09:27:30 +02:00
virtio-mem.h hw/virtio/virtio-mem: Fix definition of VirtIOMEMClass 2025-06-10 12:59:09 +02:00
virtio-mmio.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
virtio-net.h virtio-net: implement extended features support 2025-10-04 10:50:37 -04:00
virtio-nsm.h device/virtio-nsm: Support for Nitro Secure Module device 2024-10-31 18:28:32 +01:00
virtio-pci.h virtio-pci: implement support for extended features 2025-10-04 10:50:37 -04:00
virtio-pmem.h hw/virtio/virtio-pmem: Fix definition of VirtIOPMEMClass 2025-06-10 12:59:09 +02:00
virtio-rng.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
virtio-scsi.h virtio-scsi: handle ctrl virtqueue in main loop 2025-03-13 17:57:23 +01:00
virtio-serial.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
virtio.h virtio: unify virtio_notify_irqfd() and virtio_notify() 2025-10-05 09:01:08 -04:00