On 5/18/24 11:31, Nicholas Piggin wrote:
@@ -425,17 +426,17 @@ static void powerpc_set_excp_state(PowerPCCPU *cpu, 
target_ulong vector,
      env->reserve_addr = -1;
  }
-static void powerpc_mcheck_checkstop(CPUPPCState *env)
-{
-    /* KVM guests always have MSR[ME] enabled */
  #ifdef CONFIG_TCG
+/*
+ * This stops the machine and logs CPU state without killing QEMU (like
+ * cpu_abort()) because it is often a guest error as opposed to a QEMU error,
+ * so the machine can still be debugged.
+ */
+static G_NORETURN void powerpc_checkstop(CPUPPCState *env, const char *reason)
+{
      CPUState *cs = env_cpu(env);
      FILE *f;
- if (FIELD_EX64(env->msr, MSR, ME)) {
-        return;
-    }
-
      f = qemu_log_trylock();
      if (f) {
          fprintf(f, "Entering checkstop state: "
@@ -451,6 +452,30 @@ static void powerpc_mcheck_checkstop(CPUPPCState *env)
       */
      qemu_system_guest_panicked(NULL);
      cpu_loop_exit_noexc(cs);
+}

Looks like you're not using reason.
Missed swapping out in the logging block?


r~

Reply via email to