]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
accel/tcg: Generalize fake_user_interrupt test
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 26 Apr 2025 20:20:24 +0000 (20:20 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 30 Apr 2025 19:45:05 +0000 (12:45 -0700)
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>
accel/tcg/cpu-exec.c

index 279df5fae7efbbc75ca1bd21c007c24345f88e93..8ff4a3450916b85f0b2530c87d9b306b0a1e8a75 100644 (file)
@@ -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;