aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-04-26 20:20:24 +0000
committerRichard Henderson <richard.henderson@linaro.org>2025-04-30 12:45:05 -0700
commit9a1e3713232f9641353e63fd279eb83cc723faf2 (patch)
treeb9369837184d0adf5db627ce06e2da111c2fc6e0
parent84307cd6027c4602913177ff09aeefa4743b7234 (diff)
downloadqemu-9a1e3713232f9641353e63fd279eb83cc723faf2.zip
qemu-9a1e3713232f9641353e63fd279eb83cc723faf2.tar.gz
qemu-9a1e3713232f9641353e63fd279eb83cc723faf2.tar.bz2
accel/tcg: Generalize fake_user_interrupt test
Test for the hook being present instead of ifdef TARGET_I386. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--accel/tcg/cpu-exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 279df5f..8ff4a34 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -732,10 +732,10 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
* If user mode only, we simulate a fake exception which will be
* handled outside the cpu execution loop.
*/
-#if defined(TARGET_I386)
const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
- tcg_ops->fake_user_interrupt(cpu);
-#endif /* TARGET_I386 */
+ if (tcg_ops->fake_user_interrupt) {
+ tcg_ops->fake_user_interrupt(cpu);
+ }
*ret = cpu->exception_index;
cpu->exception_index = -1;
return true;