A thread entering wait mode raises CPU_INTERRUPT_HALT on itself and only
takes it once its TB ends.  If another thread resumes it in between, the
HALT is still pending.

Clear the HALT on resume.

Signed-off-by: Brian Cain <[email protected]>
---
 target/hexagon/cpu_helper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/hexagon/cpu_helper.c b/target/hexagon/cpu_helper.c
index 6dc06401ad5..b6f31aefc0f 100644
--- a/target/hexagon/cpu_helper.c
+++ b/target/hexagon/cpu_helper.c
@@ -138,6 +138,7 @@ static void hexagon_resume_thread(CPUHexagonState *env)
     clear_wait_mode(env);
     cs = env_cpu(env);
     ASSERT_DIRECT_TO_GUEST_UNSET(env, cs->exception_index);
+    cpu_reset_interrupt(cs, CPU_INTERRUPT_HALT);
     cs->halted = false;
     cs->exception_index = HEX_EVENT_NONE;
     qemu_cpu_kick(cs);
-- 
2.34.1

Reply via email to