qemu-e2k/include/qemu
Greg Kurz ef149763a8 rcu: Introduce force_rcu notifier
The drain_rcu_call() function can be blocked as long as an RCU reader
stays in a read-side critical section. This is typically what happens
when a TCG vCPU is executing a busy loop. It can deadlock the QEMU
monitor as reported in https://gitlab.com/qemu-project/qemu/-/issues/650 .

This can be avoided by allowing drain_rcu_call() to enforce an RCU grace
period. Since each reader might need to do specific actions to end a
read-side critical section, do it with notifiers.

Prepare ground for this by adding a notifier list to the RCU reader
struct and use it in wait_for_readers() if drain_rcu_call() is in
progress. An API is added for readers to register their notifiers.

This is largely based on a draft from Paolo Bonzini.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211109183523.47726-2-groug@kaod.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-10 13:20:15 +01:00
..
accel.h accel-cpu: make cpu_realizefn return a bool 2021-05-10 15:41:50 -04:00
atomic128.h docs: fix references to docs/devel/atomics.rst 2021-06-02 06:51:09 +02:00
atomic.h qemu/atomic: Add aligned_{int64,uint64}_t types 2021-07-21 07:45:38 -10:00
base64.h
bcd.h
bitmap.h
bitops.h bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") 2021-07-26 06:56:41 -10:00
bswap.h include/qemu/bswap.h: Handle being included outside extern "C" block 2021-05-10 17:21:54 +01:00
buffer.h
cacheflush.h util: Enhance flush_icache_range with separate data pointer 2021-01-07 05:09:41 -10:00
co-shared-resource.h co-shared-resource: protect with a mutex 2021-06-25 14:24:24 +03:00
compiler.h configure: Remove probe for _Static_assert 2021-06-16 15:03:26 +02:00
config-file.h qemu-config: parse configuration files to a QDict 2021-06-04 13:50:01 +02:00
coroutine_int.h
coroutine.h co-queue: drop extra coroutine_fn marks 2021-06-18 10:59:52 -05:00
cpuid.h
crc32c.h
crc-ccitt.h util: Add CRC16 (CCITT) calculation routines 2021-01-24 20:10:54 +01:00
ctype.h
cutils.h
datadir.h
dbus.h
drm.h
envlist.h
error-report.h error: rename error_with_timestamp to message_with_timestamp 2021-02-01 10:50:55 +00:00
event_notifier.h event_notifier: handle initialization failure better 2021-02-08 14:43:55 +01:00
fifo8.h utils/fifo8: add VMSTATE_FIFO8_TEST macro 2021-02-07 20:38:34 +00:00
fifo32.h
filemonitor.h
futex.h
guest-random.h
hbitmap.h
help_option.h
host-utils.h host-utils: add 128-bit quotient support to divu128/divs128 2021-10-27 17:10:00 -07:00
id.h net: Use id_generate() in the network subsystem, too 2021-03-09 21:47:45 +01:00
int128.h qemu/int128: Add int128_{not,xor} 2021-10-27 17:10:00 -07:00
iov.h util/iov: make qemu_iovec_init_extended() honest 2021-02-03 08:00:33 -06:00
iova-tree.h util: Make some iova_tree parameters const 2021-11-02 15:57:21 +01:00
jhash.h
job.h job: Add job_cancel_requested() 2021-10-07 10:42:40 +02:00
lockable.h include/qemu/lockable: Use _Generic instead of QEMU_GENERIC 2021-06-16 15:03:26 +02:00
log-for-trace.h
log.h
main-loop.h util/async: add a human-readable name to BHs for debugging 2021-07-05 11:40:32 +01:00
memfd.h
mmap-alloc.h util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap() 2021-06-15 20:27:38 +02:00
module.h docs: remove non-reference uses of single backticks 2021-11-08 12:27:23 +04:00
notify.h
nvdimm-utils.h
option_int.h
option.h qemu-option: remove now-dead code 2021-07-06 08:33:51 +02:00
osdep.h osdep: fix HAVE_BROKEN_SIZE_MAX case 2021-07-09 18:19:00 +02:00
path.h
plugin-memory.h plugins: fix-up handling of internal hostaddr for 32 bit 2021-07-14 14:33:53 +01:00
plugin.h plugins: try and make plugin_insn_append more ergonomic 2021-11-04 10:32:01 +00:00
pmem.h
processor.h
progress_meter.h progressmeter: protect with a mutex 2021-06-25 14:24:24 +03:00
qdist.h
qemu-options.h remove qemu-options* from root directory 2021-05-26 14:49:46 +02:00
qemu-plugin.h plugins/api: added a boolean parsing plugin api 2021-09-02 11:29:34 +01:00
qemu-print.h
qht.h
qsp.h
queue.h
range.h
ratelimit.h ratelimit: treat zero speed as unlimited 2021-06-25 14:22:21 +03:00
rcu_queue.h
rcu.h rcu: Introduce force_rcu notifier 2021-11-10 13:20:15 +01:00
readline.h
selfmap.h Remove leading underscores from QEMU defines 2021-06-21 05:49:01 +02:00
seqlock.h
sockets.h qemu-sockets: introduce socket_address_parse_named_fd() 2021-06-18 10:59:53 -05:00
stats64.h qemu/atomic: Add aligned_{int64,uint64}_t types 2021-07-21 07:45:38 -10:00
sys_membarrier.h
systemd.h
thread-posix.h util: Use unique type for QemuRecMutex in thread-posix.h 2021-06-16 15:03:26 +02:00
thread-win32.h util: Use real functions for thread-posix QemuRecMutex 2021-06-16 15:03:26 +02:00
thread.h util: Pass file+line to qemu_rec_mutex_unlock_impl 2021-06-16 15:03:26 +02:00
throttle-options.h
throttle.h
timed-average.h
timer.h spapr: rollback 'unplug timeout' for CPU hotunplugs 2021-04-12 12:27:14 +10:00
transactions.h util: add transactions.c 2021-04-30 12:27:47 +02:00
tsan.h
typedefs.h exec: Move TranslationBlock typedef to qemu/typedefs.h 2021-02-18 08:19:08 +00:00
unicode.h
units.h
uri.h
userfaultfd.h migration: introduce UFFD-WP low-level interface helpers 2021-02-08 11:19:51 +00:00
uuid.h
vfio-helpers.h util/vfio-helpers: Pass Error handle to qemu_vfio_dma_map() 2021-09-07 09:08:24 +01:00
vhost-user-server.h
win_dump_defs.h
xattr.h
xxhash.h target/arm: Implement an IMPDEF pauth algorithm 2021-01-19 14:38:51 +00:00
yank.h yank: Remove dependency on qiochannel 2021-04-01 15:27:44 +04:00