]> xenbits.xensource.com Git - qemu-xen-unstable.git/commitdiff
spapr: Fix failure path for attempting to hot unplug PCI bridges
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 26 Mar 2020 05:12:40 +0000 (16:12 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 6 Apr 2020 22:55:11 +0000 (08:55 +1000)
For various technical reasons we can't currently allow unplug a PCI to PCI
bridge on the pseries machine.  spapr_pci_unplug_request() correctly
generates an error message if that's attempted.

But.. if the given errp is not error_abort or error_fatal, it doesn't
actually stop trying to unplug the bridge anyway.

Fixes: 14e714900f6b "spapr: Allow hot plug/unplug of PCI bridges and devices under PCI bridges"
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
hw/ppc/spapr_pci.c

index 709a52780dd4f081a6f155b06f54ca6e1c7649f9..55ca9dee1e5aeb7956ca983450b6e835003b9ba7 100644 (file)
@@ -1663,6 +1663,7 @@ static void spapr_pci_unplug_request(HotplugHandler *plug_handler,
 
         if (pc->is_bridge) {
             error_setg(errp, "PCI: Hot unplug of PCI bridges not supported");
+            return;
         }
 
         /* ensure any other present functions are pending unplug */