From 30311dc0e5a8027c8fffe07fb301e92ab585ef4e Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Mon, 19 Oct 2026 15:39:30 -0700 Subject: [PATCH] target/hexagon: check exception_index in has_work Without this check, a halted thread that gets an NMI while its modectl E-bit is still set won't wake if no interrupt_request bits happen to be pending. Reviewed-by: Pierrick Bouvier Signed-off-by: Brian Cain --- target/hexagon/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 632ee3d60b..281d201250 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -430,6 +430,9 @@ static bool hexagon_cpu_has_work(CPUState *cs) { CPUHexagonState *env = cpu_env(cs); + if (qatomic_read(&cs->exception_index) != HEX_EVENT_NONE) { + return true; + } return hexagon_thread_is_enabled(env) && (cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_SWI | CPU_INTERRUPT_K0_UNLOCK | CPU_INTERRUPT_TLB_UNLOCK