It is no longer necessary. Signed-off-by: Akihiko Odaki <od...@rsg.ci.i.u-tokyo.ac.jp> --- hw/ppc/spapr_pci.c | 22 ---------------------- 1 file changed, 22 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 1ac1185825e84ca908fd878f6cbe7e8cacac1d89..b4043ee752c5f9ab2c0f5800dffa809d3c182225 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1735,27 +1735,13 @@ static void spapr_phb_unrealize(DeviceState *dev) SysBusDevice *s = SYS_BUS_DEVICE(dev); PCIHostState *phb = PCI_HOST_BRIDGE(s); SpaprPhbState *sphb = SPAPR_PCI_HOST_BRIDGE(phb); - SpaprTceTable *tcet; int i; - const unsigned windows_supported = spapr_phb_windows_supported(sphb); if (sphb->msi) { g_hash_table_unref(sphb->msi); sphb->msi = NULL; } - /* - * Remove IO/MMIO subregions and aliases, rest should get cleaned - * via PHB's unrealize->object_finalize - */ - for (i = windows_supported - 1; i >= 0; i--) { - tcet = spapr_tce_find_by_liobn(sphb->dma_liobn[i]); - if (tcet) { - memory_region_del_subregion(&sphb->iommu_root, - spapr_tce_get_iommu(tcet)); - } - } - remove_drcs(sphb, phb->bus); for (i = PCI_NUM_PINS - 1; i >= 0; i--) { @@ -1767,8 +1753,6 @@ static void spapr_phb_unrealize(DeviceState *dev) QLIST_REMOVE(sphb, list); - memory_region_del_subregion(&sphb->iommu_root, &sphb->msiwindow); - /* * An attached PCI device may have memory listeners, eg. VFIO PCI. We have * unmapped all sections. Remove the listeners now, before destroying the @@ -1779,12 +1763,6 @@ static void spapr_phb_unrealize(DeviceState *dev) qbus_set_hotplug_handler(BUS(phb->bus), NULL); pci_unregister_root_bus(phb->bus); - - memory_region_del_subregion(get_system_memory(), &sphb->iowindow); - if (sphb->mem64_win_pciaddr != (hwaddr)-1) { - memory_region_del_subregion(get_system_memory(), &sphb->mem64window); - } - memory_region_del_subregion(get_system_memory(), &sphb->mem32window); } static void spapr_phb_destroy_msi(gpointer opaque) -- 2.51.0