qemu/include
Hanna Czenczek 00e50cb429 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>
(cherry picked from commit 5bdbaebcce)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-02-12 19:26:03 +03:00
..
authz
block virtio: Re-enable notifications after drain 2024-02-12 19:26:03 +03:00
chardev include/: spelling fixes 2023-09-08 13:08:52 +03:00
crypto crypto: Add generic 64-bit carry-less multiply routine 2023-09-15 13:57:00 +00:00
disas
exec accel/tcg: Remove CF_LAST_IO 2023-11-14 10:40:54 -08: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 s390x/pci: drive ISM reset from subsystem reset 2024-01-22 18:23:48 +03:00
io io: follow coroutine AioContext in qio_channel_yield() 2023-09-07 20:32:11 -05:00
libdecnumber
migration migration: per-mode blockers 2023-11-01 16:13:59 +01:00
monitor
net net: Update MemReentrancyGuard for NIC 2023-11-21 15:42:34 +08:00
qapi qobject atomics osdep: Make a few macros more hygienic 2023-09-29 08:13:57 +02:00
qemu osdep: add getloadavg 2023-12-01 08:53:04 -05: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: Update to Linux v6.6-rc1 2023-09-12 11:34:56 +02:00
sysemu dump: Add arch cleanup function 2023-11-14 10:42:32 +01:00
tcg tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
ui include/ui/rect.h: fix qemu_rect_init() mis-assignment 2023-12-26 18:10:36 +03:00
user
elf.h
glib-compat.h
qemu-io.h
qemu-main.h