]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr_rtas.c
target/ppc: Build rtas error log upon an MCE
authorAravinda Prasad <arawinda.p@gmail.com>
Thu, 30 Jan 2020 18:44:20 +0000 (00:14 +0530)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 3 Feb 2020 00:33:10 +0000 (11:33 +1100)
commit81fe70e443ef7e3b5e8f2e30336029ed5b968741
treedfb47c05978046a5e92a037acd64b9187e1bb52c
parent9ac703ac5f9e830ab96d38dc77061bd4be76cf60
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>
hw/ppc/spapr_events.c
hw/ppc/spapr_rtas.c
include/hw/ppc/spapr.h
target/ppc/kvm.c