Commit 6fc430ca0d for qemu.org
commit 6fc430ca0d2175e2c35e1c65515f043f0a679d35
Author: Brian Cain <brian.cain@oss.qualcomm.com>
Date: Mon Oct 5 12:45:18 2026 -0700
target/hexagon: yield on system-mode pause
System-mode pause currently advances the PC and continues execution instead
of yielding the vCPU. Raise EXCP_YIELD with the next packet PC so execution
returns to the CPU loop and another hardware thread can run. Keep the
linux-user behavior unchanged.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h
index 5f7df66ae6..80d8a7b6ba 100644
--- a/target/hexagon/gen_tcg.h
+++ b/target/hexagon/gen_tcg.h
@@ -1125,11 +1125,21 @@
#define fGEN_TCG_Y2_break(SHORTCODE)
#define fGEN_TCG_J2_unpause(SHORTCODE)
+#ifdef CONFIG_USER_ONLY
#define fGEN_TCG_J2_pause(SHORTCODE) \
do { \
uiV = uiV; \
tcg_gen_movi_tl(hex_gpr[HEX_REG_PC], ctx->next_PC); \
} while (0)
+#else
+#define fGEN_TCG_J2_pause(SHORTCODE) \
+ do { \
+ uiV = uiV; \
+ gen_helper_raise_exception(tcg_env, \
+ tcg_constant_i32(EXCP_YIELD), \
+ tcg_constant_i32(ctx->next_PC)); \
+ } while (0)
+#endif
/* r0 = asr(r1, r2):sat */
#define fGEN_TCG_S2_asr_r_r_sat(SHORTCODE) \