qemu/include
Hanna Czenczek 5bdbaebcce virtio: Re-enable notifications after drain
During drain, we do not care about virtqueue notifications, which is why
we remove the handlers on it.  When removing those handlers, whether vq
notifications are enabled or not depends on whether we were in polling
mode or not; if not, they are enabled (by default); if so, they have
been disabled by the io_poll_start callback.

Because we do not care about those notifications after removing the
handlers, this is fine.  However, we have to explicitly ensure they are
enabled when re-attaching the handlers, so we will resume receiving
notifications.  We do this in virtio_queue_aio_attach_host_notifier*().
If such a function is called while we are in a polling section,
attaching the notifiers will then invoke the io_poll_start callback,
re-disabling notifications.

Because we will always miss virtqueue updates in the drained section, we
also need to poll the virtqueue once after attaching the notifiers.

Buglink: https://issues.redhat.com/browse/RHEL-3934
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-ID: <20240202153158.788922-3-hreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-02-07 21:51:03 +01:00
..
authz Prefer 'on' | 'off' over 'yes' | 'no' for bool options 2021-01-29 17:07:53 +00:00
block virtio: Re-enable notifications after drain 2024-02-07 21:51:03 +01:00
chardev chardev: use bool for fe_is_open 2024-01-12 13:23:48 +00:00
crypto crypto: Add generic 64-bit carry-less multiply routine 2023-09-15 13:57:00 +00:00
disas disas: Change type of disassemble_info.target_info to pointer 2023-06-13 17:25:47 +10:00
exec include/exec: Change cpu_mmu_index argument to CPUState 2024-02-03 16:46:10 +10:00
fpu fpu: Add conversions between bfloat16 and [u]int8 2023-09-16 14:57:15 +00:00
gdbstub gdbstub: replace exit calls with proper shutdown for softmmu 2023-10-12 12:36:37 +10:00
hw scsi: Don't ignore most usb-storage properties 2024-02-07 15:25:13 +01:00
io Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
libdecnumber Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
migration Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
monitor monitor: add more *_locked() functions 2023-05-25 10:18:33 +02:00
net net: make nb_nics and nd_table[] static in net/net.c 2024-02-02 16:23:48 +00:00
qapi qapi: Fix dangling references to docs/devel/qapi-code-gen.txt 2024-01-26 07:04:53 +01:00
qemu trivial patches for 2024-01-31 2024-01-31 19:53:45 +00:00
qom qom: Add object_property_set_default_list() 2023-11-10 18:19:14 +01:00
scsi hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
semihosting * util/log: re-allow switching away from stderr log file 2023-10-09 10:11:18 -04:00
standard-headers linux-headers: Synchronize linux headers from linux v6.7.0-rc8 2024-01-11 19:14:00 +08:00
sysemu HW core patch queue 2024-01-19 11:39:38 +00:00
tcg accel/tcg: Move perf and debuginfo support to tcg/ 2024-01-29 21:04:10 +10:00
ui include: Clean up includes 2024-01-30 21:20:20 +03:00
user bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
elf.h util: spelling fixes 2023-08-31 19:47:43 +02:00
glib-compat.h compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-main.h ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00