summary refs log tree commit diff stats
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-08-01 14:57:51 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-09-17 19:00:55 +0200
commitac6c8a390b451913995ee784ef7261b8928e5ace (patch)
treeb2b99f844f80bfd081ffe1c388e70d5164e65931 /linux-user/main.c
parent9e1ecd4aaaf9aa2f5b7caf364a10241a2cba02a8 (diff)
downloadfocaccia-qemu-ac6c8a390b451913995ee784ef7261b8928e5ace.tar.gz
focaccia-qemu-ac6c8a390b451913995ee784ef7261b8928e5ace.zip
accel: use store_release/load_acquire for cross-thread exit_request
Reads and writes cpu->exit_request do not use a load-acquire/store-release
pair right now, but this means that cpu_exit() may not write cpu->exit_request
after any flags that are read by the vCPU thread.

Probably everything is protected one way or the other by the BQL, because
cpu->exit_request leads to the slow path, where the CPU thread often takes
the BQL (for example, to go to sleep by waiting on the BQL-protected
cpu->halt_cond); but it's not clear, so use load-acquire/store-release
consistently.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'linux-user/main.c')
0 files changed, 0 insertions, 0 deletions