From 3431648272d317ed768fe46183c7a1cea4803732 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Wed, 20 Aug 2014 22:16:36 +1000 Subject: spapr: Add support for new NMI interface This implements an NMI interface POWERPC SPAPR machine. This enables an "nmi" HMP/QMP command supported on SPAPR. This calls POWERPC_EXCP_RESET (vector 0x100) in the guest to deliver NMI to every CPU. The expected result is XMON (in-kernel debugger) invocation. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Alexander Graf Signed-off-by: Paolo Bonzini --- target-ppc/cpu-qom.h | 1 + target-ppc/excp_helper.c | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'target-ppc') diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h index 0fee36f06a..a379f795bc 100644 --- a/target-ppc/cpu-qom.h +++ b/target-ppc/cpu-qom.h @@ -127,6 +127,7 @@ int ppc64_cpu_write_elf64_qemunote(WriteCoreDumpFunction f, int ppc64_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, void *opaque); #ifndef CONFIG_USER_ONLY +void ppc_cpu_do_system_reset(CPUState *cs); extern const struct VMStateDescription vmstate_ppc_cpu; typedef struct PPCTimebase { diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c index be7159013f..922e86d54b 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -810,6 +810,14 @@ void ppc_hw_interrupt(CPUPPCState *env) } } } + +void ppc_cpu_do_system_reset(CPUState *cs) +{ + PowerPCCPU *cpu = POWERPC_CPU(cs); + CPUPPCState *env = &cpu->env; + + powerpc_excp(cpu, env->excp_model, POWERPC_EXCP_RESET); +} #endif /* !CONFIG_USER_ONLY */ #if defined(DEBUG_OP) -- cgit v1.2.1