From: Pierrick Bouvier Date: Fri, 25 Oct 2024 17:58:57 +0000 (-0700) Subject: cpu: ensure we don't call start_exclusive from cpu_exec X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=779f30a01af8566780cefc8639505b758950afb3;p=qemu.git cpu: ensure we don't call start_exclusive from cpu_exec Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20241025175857.2554252-3-pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson --- diff --git a/cpu-common.c b/cpu-common.c index 6b262233a3..0d607bbe49 100644 --- a/cpu-common.c +++ b/cpu-common.c @@ -194,6 +194,9 @@ void start_exclusive(void) CPUState *other_cpu; int running_cpus; + /* Ensure we are not running, or start_exclusive will be blocked. */ + g_assert(!current_cpu->running); + if (current_cpu->exclusive_context_count) { current_cpu->exclusive_context_count++; return;