qemu/tests
Stefan Hajnoczi effd60c878 monitor: only run coroutine commands in qemu_aio_context
monitor_qmp_dispatcher_co() runs in the iohandler AioContext that is not
polled during nested event loops. The coroutine currently reschedules
itself in the main loop's qemu_aio_context AioContext, which is polled
during nested event loops. One known problem is that QMP device-add
calls drain_call_rcu(), which temporarily drops the BQL, leading to all
sorts of havoc like other vCPU threads re-entering device emulation code
while another vCPU thread is waiting in device emulation code with
aio_poll().

Paolo Bonzini suggested running non-coroutine QMP handlers in the
iohandler AioContext. This avoids trouble with nested event loops. His
original idea was to move coroutine rescheduling to
monitor_qmp_dispatch(), but I resorted to moving it to qmp_dispatch()
because we don't know if the QMP handler needs to run in coroutine
context in monitor_qmp_dispatch(). monitor_qmp_dispatch() would have
been nicer since it's associated with the monitor implementation and not
as general as qmp_dispatch(), which is also used by qemu-ga.

A number of qemu-iotests need updated .out files because the order of
QMP events vs QMP responses has changed.

Solves Issue #1933.

Cc: qemu-stable@nongnu.org
Fixes: 7bed89958b ("device_core: use drain_call_rcu in in qmp_device_add")
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2215192
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2214985
Buglink: https://issues.redhat.com/browse/RHEL-17369
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20240118144823.1497953-4-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-01-26 11:16:58 +01:00
..
avocado acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM 2024-01-18 12:47:25 +00:00
bench meson: remove unused variable 2023-12-31 09:11:27 +01:00
data tests/acpi: update expected data files 2023-12-13 11:22:34 +01:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker tests/docker: Hexagon toolchain update 2024-01-21 18:24:05 -08:00
fp tests/fp: Bump fp-test-mulAdd test timeout to 3 minutes 2024-01-12 13:23:48 +00:00
guest-debug tests/tcg: clean-up gdb confirm/pagination settings 2023-08-30 14:57:50 +01:00
image-fuzzer
include
keys
lcitool .gitlab-ci.d/cirrus: Add manual testing of macOS 14 (Sonoma) 2023-11-24 16:21:55 +01:00
migration tests/qtest: option to suspend during migration 2024-01-04 09:52:42 +08:00
multiboot
perf/block/qcow2
plugin configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
qapi-schema tests/qapi-schema: Tidy up pylint warnings and advice 2023-11-13 10:36:51 +01:00
qemu-iotests monitor: only run coroutine commands in qemu_aio_context 2024-01-26 11:16:58 +01:00
qtest tests/qtest: Bump timeouts of boot_sector_test()-based tests to 610 seconds 2024-01-24 09:54:05 +01:00
rocker
tcg HW core patch queue 2024-01-19 11:39:38 +00:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/: spelling fixes 2023-09-08 13:08:52 +03:00
unit commit: Allow users to request only format driver names in backing file format 2024-01-26 11:16:58 +01:00
vm tests/vm/netbsd: Remove missing py311-expat package 2024-01-19 11:38:32 +01:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests: respect --enable/--disable-download for Avocado 2023-11-24 12:07:47 +01:00
meson.build configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00