summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-27 11:26:10 +0100
committerNicholas Piggin <npiggin@gmail.com>2025-03-11 22:43:31 +1000
commit30de74bda77fd5eb7c7dc9c50ed4ea39bbc367b6 (patch)
treec8a35330766b327ca5c0d30a29b51690f3159e5f
parent720c2f2d53d45bae18cbc9eaa39b56c2f00fefb7 (diff)
downloadfocaccia-qemu-30de74bda77fd5eb7c7dc9c50ed4ea39bbc367b6.tar.gz
focaccia-qemu-30de74bda77fd5eb7c7dc9c50ed4ea39bbc367b6.zip
target/ppc: Ensure powerpc_mcheck_checkstop() is only called under TCG
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250127102620.39159-7-philmd@linaro.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
-rw-r--r--target/ppc/excp_helper.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 8956466db1..b08cd53688 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -19,6 +19,7 @@
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
 #include "qemu/log.h"
+#include "system/tcg.h"
 #include "system/system.h"
 #include "system/runstate.h"
 #include "cpu.h"
@@ -30,7 +31,6 @@
 #include "trace.h"
 
 #ifdef CONFIG_TCG
-#include "system/tcg.h"
 #include "exec/helper-proto.h"
 #include "exec/cpu_ldst.h"
 #endif
@@ -443,13 +443,11 @@ void helper_attn(CPUPPCState *env)
 static void powerpc_mcheck_checkstop(CPUPPCState *env)
 {
     /* KVM guests always have MSR[ME] enabled */
-#ifdef CONFIG_TCG
     if (FIELD_EX64(env->msr, MSR, ME)) {
         return;
     }
-
+    assert(tcg_enabled());
     powerpc_checkstop(env, "machine check with MSR[ME]=0");
-#endif
 }
 
 static void powerpc_excp_40x(PowerPCCPU *cpu, int excp)