]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
spapr_pci: parent the MSI memory region to the PHB
authorGreg Kurz <groug@kaod.org>
Tue, 25 Jul 2017 17:59:18 +0000 (19:59 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 7 Sep 2017 23:30:54 +0000 (09:30 +1000)
This memory region should be owned by the PHB. This ensures the PHB
cannot be finalized as long as the the region is guest visible, or
used by a CPU or a device.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_pci.c

index d258bc08d5f0c60e29bf878840c533331ab78004..d7880f257aa14e4ac6df27b3ee87dddfa42febb1 100644 (file)
@@ -1703,7 +1703,7 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)
     }
 #endif
 
-    memory_region_init_io(&sphb->msiwindow, NULL, &spapr_msi_ops, spapr,
+    memory_region_init_io(&sphb->msiwindow, OBJECT(sphb), &spapr_msi_ops, spapr,
                           "msi", msi_window_size);
     memory_region_add_subregion(&sphb->iommu_root, SPAPR_PCI_MSI_WINDOW,
                                 &sphb->msiwindow);