cpu: ensure we don't call start_exclusive from cpu_exec

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241025175857.2554252-3-pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Pierrick Bouvier 2024-10-25 10:58:57 -07:00 committed by Richard Henderson
parent 7ba055b49b
commit 779f30a01a

View File

@ -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;