From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubrdq-0006gO-Gv for qemu-devel@nongnu.org; Mon, 13 May 2013 08:14:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ubrdo-0001QC-Hh for qemu-devel@nongnu.org; Mon, 13 May 2013 08:14:10 -0400 Received: from mail-gg0-x236.google.com ([2607:f8b0:4002:c02::236]:56806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubrdo-0001Pz-E1 for qemu-devel@nongnu.org; Mon, 13 May 2013 08:14:08 -0400 Received: by mail-gg0-f182.google.com with SMTP id f1so1401927ggn.27 for ; Mon, 13 May 2013 05:14:07 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5190D909.5000202@redhat.com> Date: Mon, 13 May 2013 14:14:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1368442465-14363-1-git-send-email-david@gibson.dropbear.id.au> <1368442465-14363-3-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1368442465-14363-3-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [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: David Gibson Cc: aik@ozlabs.ru, alex.williamson@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, agraf@suse.de Il 13/05/2013 12:54, David Gibson ha scritto: > 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); > } > Applied to iommu branch, thanks. Paolo