qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 03/13] ppc/spapr: Disable FWNMI capability with TCG


From: Nicholas Piggin
Subject: [RFC PATCH 03/13] ppc/spapr: Disable FWNMI capability with TCG
Date: Wed, 4 Mar 2020 15:28:40 +1000

Succeeding "ibm,nmi-register" RTAS calls but failing to actually
operate to specification is unhelpful at best. Disable the capability
when running on TCG.

Signed-off-by: Nicholas Piggin <address@hidden>
---
 hw/ppc/spapr_caps.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index f626d769a0..10864c7eed 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -517,12 +517,12 @@ static void cap_fwnmi_apply(SpaprMachineState *spapr, 
uint8_t val,
     }
 
     if (tcg_enabled()) {
-        warn_report("Firmware Assisted Non-Maskable Interrupts(FWNMI) not "
-                    "supported in TCG");
+        error_setg(errp, "Firmware Assisted Non-Maskable Interrupts(FWNMI) not 
"
+                         "supported in TCG");
     } else if (kvm_enabled()) {
         if (kvmppc_set_fwnmi() < 0) {
             error_setg(errp, "Firmware Assisted Non-Maskable Interrupts(FWNMI) 
"
-                             "not supported by KVM");
+                             "not supported by KVM.");
         }
     }
 }
@@ -645,6 +645,10 @@ static SpaprCapabilities 
default_caps_with_cpu(SpaprMachineState *spapr,
 
     caps = smc->default_caps;
 
+    if (tcg_enabled()) {
+        caps.caps[SPAPR_CAP_FWNMI] = SPAPR_CAP_OFF;
+    }
+
     if (!ppc_type_check_compat(cputype, CPU_POWERPC_LOGICAL_3_00,
                                0, spapr->max_compat_pvr)) {
         caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF;
-- 
2.23.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]