diff options
author | Aravinda Prasad <arawinda.p@gmail.com> | 2020-01-31 00:14:20 +0530 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-02-03 11:33:10 +1100 |
commit | 81fe70e443ef7e3b5e8f2e30336029ed5b968741 (patch) | |
tree | dfb47c05978046a5e92a037acd64b9187e1bb52c /target | |
parent | 9ac703ac5f9e830ab96d38dc77061bd4be76cf60 (diff) |
target/ppc: Build rtas error log upon an MCE
Upon a machine check exception (MCE) in a guest address space,
KVM causes a guest exit to enable QEMU to build and pass the
error to the guest in the PAPR defined rtas error log format.
This patch builds the rtas error log, copies it to the rtas_addr
and then invokes the guest registered machine check handler. The
handler in the guest takes suitable action(s) depending on the type
and criticality of the error. For example, if an error is
unrecoverable memory corruption in an application inside the
guest, then the guest kernel sends a SIGBUS to the application.
For recoverable errors, the guest performs recovery actions and
logs the error.
Signed-off-by: Aravinda Prasad <arawinda.p@gmail.com>
[Assume SLOF has allocated enough room for rtas error log]
Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20200130184423.20519-5-ganeshgr@linux.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target')
-rw-r--r-- | target/ppc/kvm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 56a6865521..7f44b1aa1a 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2810,9 +2810,11 @@ int kvm_arch_msi_data_to_gsi(uint32_t data) #if defined(TARGET_PPC64) int kvm_handle_nmi(PowerPCCPU *cpu, struct kvm_run *run) { + bool recovered = run->flags & KVM_RUN_PPC_NMI_DISP_FULLY_RECOV; + cpu_synchronize_state(CPU(cpu)); - spapr_mce_req_event(cpu); + spapr_mce_req_event(cpu, recovered); return 0; } |