@@ -875,8 +875,7 @@ void spapr_mce_req_event(PowerPCCPU *cpu, bool recovered)
if (spapr->fwnmi_machine_check_addr == -1) {
/* Non-FWNMI case, deliver it like an architected CPU interrupt. */
- cs->exception_index = POWERPC_EXCP_MCHECK;
- ppc_cpu_do_interrupt(cs);
+ ppc_cpu_do_machine_check(cs);
return;
}
@@ -2601,6 +2601,13 @@ void ppc_cpu_do_system_reset(CPUState *cs)
powerpc_excp(cpu, POWERPC_EXCP_RESET);
}
+void ppc_cpu_do_machine_check(CPUState *cs)
+{
+ PowerPCCPU *cpu = POWERPC_CPU(cs);
+
+ powerpc_excp(cpu, POWERPC_EXCP_MCHECK);
+}
+
void ppc_cpu_do_fwnmi_machine_check(CPUState *cs, target_ulong vector)
{
PowerPCCPU *cpu = POWERPC_CPU(cs);
This matches the NMI injection helper function. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- hw/ppc/spapr_events.c | 3 +-- target/ppc/excp_helper.c | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-)