]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
ppc/spapr: Add FWNMI machine check delivery warnings
authorNicholas Piggin <npiggin@gmail.com>
Wed, 25 Mar 2020 14:29:05 +0000 (00:29 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 6 Apr 2020 22:55:10 +0000 (08:55 +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 <npiggin@gmail.com>
Message-Id: <20200325142906.221248-4-npiggin@gmail.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_events.c
hw/ppc/spapr_rtas.c

index a908c5d0e9e23e186e4ea331894fcc27d920bf8f..c8964eb25dcf345b5236a18316f1074812c95bc1 100644 (file)
@@ -833,6 +833,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) {
+        error_report(
+"FWNMI: Unable to deliver machine check to guest: rtas_addr not found.");
         qemu_system_guest_panicked(NULL);
         g_free(ext_elog);
         return;
@@ -874,6 +876,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) {
+            error_report(
+"FWNMI: Unable to deliver machine check to guest: nested machine check.");
             qemu_system_guest_panicked(NULL);
             return;
         }
index 29abe66d0139949c8307e2e7e8d3d0cb30bb2d93..bcac0d00e7b6b5cf639c65b82cca9bc631824b1b 100644 (file)
@@ -462,6 +462,9 @@ 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;