From: Philippe Mathieu-Daudé Date: Thu, 19 Jun 2025 05:56:13 +0000 (+0200) Subject: system/cpus: Assert interrupt handling is done with BQL locked X-Git-Tag: v10.1.0-rc0~32^2~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d30245d3f54187d5ef4fbc9013386b98b22da2b5;p=thirdparty%2Fqemu.git system/cpus: Assert interrupt handling is done with BQL locked Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Xiaoyao Li Reviewed-by: Zhao Liu Message-Id: <20250703173248.44995-5-philmd@linaro.org> --- diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index b24d6a75625..6116644d1c0 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -93,8 +93,6 @@ static void tcg_cpu_reset_hold(CPUState *cpu) /* mask must never be zero, except for A20 change call */ void tcg_handle_interrupt(CPUState *cpu, int mask) { - g_assert(bql_locked()); - cpu->interrupt_request |= mask; /* diff --git a/system/cpus.c b/system/cpus.c index d16b0dff989..a43e0e4e796 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -265,6 +265,8 @@ static void generic_handle_interrupt(CPUState *cpu, int mask) void cpu_interrupt(CPUState *cpu, int mask) { + g_assert(bql_locked()); + if (cpus_accel->handle_interrupt) { cpus_accel->handle_interrupt(cpu, mask); } else {