qemu-ppc
[Top][All Lists]
Advanced

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

[Qemu-ppc] [PULL 13/37] spapr: Forbid setting ic-mode for old machine ty


From: David Gibson
Subject: [Qemu-ppc] [PULL 13/37] spapr: Forbid setting ic-mode for old machine types
Date: Mon, 4 Feb 2019 20:01:00 +1100

From: Greg Kurz <address@hidden>

Machine types 3.0 and older only know about the legacy XICS backend.
Make it clear by erroring out if the user tries to set ic-mode on
such machines.

Signed-off-by: Greg Kurz <address@hidden>
Tested-by: Cédric Le Goater <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
 hw/ppc/spapr.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 71fe552c83..a217c7f7a6 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3127,6 +3127,11 @@ static void spapr_set_ic_mode(Object *obj, const char 
*value, Error **errp)
 {
     sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
 
+    if (SPAPR_MACHINE_GET_CLASS(spapr)->legacy_irq_allocation) {
+        error_setg(errp, "This machine only uses the legacy XICS backend, 
don't pass ic-mode");
+        return;
+    }
+
     /* The legacy IRQ backend can not be set */
     if (strcmp(value, "xics") == 0) {
         spapr->irq = &spapr_irq_xics;
-- 
2.20.1




reply via email to

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