summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorGreg Kurz2019-01-17 12:06:38 +0100
committerDavid Gibson2019-02-04 08:44:18 +0100
commit21df5e4ffafd067090882c312c5978ee7bb2f46f (patch)
tree475ff2878107453aa84994c87748f57960984d2f /hw
parenthw/ppc/spapr: Encode the SCSI channel (bus) in the SRP LUNs (diff)
downloadqemu-21df5e4ffafd067090882c312c5978ee7bb2f46f.tar.gz
qemu-21df5e4ffafd067090882c312c5978ee7bb2f46f.tar.xz
qemu-21df5e4ffafd067090882c312c5978ee7bb2f46f.zip
spapr: Forbid setting ic-mode for old machine types
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 <groug@kaod.org> Tested-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr.c5
1 files changed, 5 insertions, 0 deletions
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;