From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbqOs-0006ZJ-Tv for qemu-devel@nongnu.org; Mon, 13 May 2013 06:54:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbqOo-0000Ux-Of for qemu-devel@nongnu.org; Mon, 13 May 2013 06:54:38 -0400 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:58837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbqOo-0000Ua-4g for qemu-devel@nongnu.org; Mon, 13 May 2013 06:54:34 -0400 From: David Gibson Date: Mon, 13 May 2013 20:54:19 +1000 Message-Id: <1368442465-14363-3-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1368442465-14363-1-git-send-email-david@gibson.dropbear.id.au> References: <1368442465-14363-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PATCH 2/8] pci: Don't del_subgregion on a non subregion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alex.williamson@redhat.com, pbonzini@redhat.com Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, David Gibson , agraf@suse.de, mst@redhat.com Currently do_pci_unregister_device() calls memory_region_del_subregion() on the device's bus_master_enable_region and the device's iommu region. But the bus_master_enable_region is an _alias_ to the iommu region, the iommu region is _not_ a subregion of it. I suspect this has slipped by only because PCI hot unplug has not been tested with the new PCI DMA address space handling. This patch removes the bogus call. Signed-off-by: David Gibson --- hw/pci/pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 0ba39e6..58d3f69 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -875,7 +875,6 @@ static void do_pci_unregister_device(PCIDevice *pci_dev) pci_config_free(pci_dev); address_space_destroy(&pci_dev->bus_master_as); - memory_region_del_subregion(&pci_dev->bus_master_enable_region, pci_dev->iommu); pci_dev->bus->iommu_dtor_fn(pci_dev->iommu); memory_region_destroy(&pci_dev->bus_master_enable_region); } -- 1.7.10.4