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 <[email protected]> Signed-off-by: Brian Cain <[email protected]> --- target/hexagon/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 632ee3d60bd..281d201250b 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 -- 2.34.1
