[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 08/13] ppc/spapr: Add FWNMI machine check delivery warnings
From: |
Nicholas Piggin |
Subject: |
[RFC PATCH 08/13] ppc/spapr: Add FWNMI machine check delivery warnings |
Date: |
Wed, 4 Mar 2020 15:28:45 +1000 |
Add some messages which explain problems and guest misbehaviour that
may be difficult to diagnose in rare cases of machine checks.
Signed-off-by: Nicholas Piggin <address@hidden>
---
hw/ppc/spapr_events.c | 4 ++++
hw/ppc/spapr_rtas.c | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index ae86629e1f..89ee036dd1 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -807,6 +807,8 @@ static void spapr_mce_dispatch_elog(PowerPCCPU *cpu, bool
recovered)
/* get rtas addr from fdt */
rtas_addr = spapr_get_rtas_addr();
if (!rtas_addr) {
+ warn_report("FWNMI: Unable to deliver machine check to guest: "
+ "rtas_addr not found.");
qemu_system_guest_panicked(NULL);
g_free(ext_elog);
return;
@@ -848,6 +850,8 @@ void spapr_mce_req_event(PowerPCCPU *cpu, bool recovered)
* that CPU called "ibm,nmi-interlock")
*/
if (spapr->fwnmi_machine_check_interlock == cpu->vcpu_id) {
+ warn_report("FWNMI: Unable to deliver machine check to guest: "
+ "nested machine check.");
qemu_system_guest_panicked(NULL);
return;
}
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 2315505181..6922a6b880 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -455,12 +455,20 @@ static void rtas_ibm_nmi_interlock(PowerPCCPU *cpu,
}
if (spapr->fwnmi_machine_check_addr == -1) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "FWNMI: ibm,nmi-interlock RTAS called with FWNMI not "
+ "registered.\n");
+
/* NMI register not called */
rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR);
return;
}
if (spapr->fwnmi_machine_check_interlock != cpu->vcpu_id) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "FWNMI: ibm,nmi-interlock RTAS called from CPU not "
+ "handling a machine check.\n");
+
/* The vCPU that hit the NMI should invoke "ibm,nmi-interlock" */
rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR);
return;
--
2.23.0
- Re: [RFC PATCH 04/13] ppc/spapr: Disable FWNMI capability if KVM does not support it, (continued)
[RFC PATCH 05/13] ppc/spapr: Fix FWNMI machine check interrupt delivery, Nicholas Piggin, 2020/03/04
[RFC PATCH 06/13] ppc/spapr: Fix FWNMI machine check failure handling, Nicholas Piggin, 2020/03/04
[RFC PATCH 09/13] ppc/spapr: Don't kill the guest if a recovered FWNMI machine check delivery fails, Nicholas Piggin, 2020/03/04
[RFC PATCH 07/13] ppc/spapr: Improve FWNMI machine check delivery corner case comments, Nicholas Piggin, 2020/03/04
[RFC PATCH 08/13] ppc/spapr: Add FWNMI machine check delivery warnings,
Nicholas Piggin <=
[RFC PATCH 10/13] target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector, Nicholas Piggin, 2020/03/04
[RFC PATCH 12/13] ppc/spapr: Allow FWNMI on TCG, Nicholas Piggin, 2020/03/04
[RFC PATCH 11/13] ppc/spapr: Implement FWNMI System Reset delivery, Nicholas Piggin, 2020/03/04
[RFC PATCH 13/13] ppc/spapr: KVM should not enable FWNMI until the guest requests it, Nicholas Piggin, 2020/03/04