From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] Don't unregister unassigned PCI BAR Date: Tue, 3 Feb 2009 09:26:59 -0200 Message-ID: <20090203112659.GA5060@amt.cnet> References: <20090203115819.GB30234@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41720 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752736AbZBCN1c (ORCPT ); Tue, 3 Feb 2009 08:27:32 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n13DRW52032307 for ; Tue, 3 Feb 2009 08:27:32 -0500 Content-Disposition: inline In-Reply-To: <20090203115819.GB30234@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 03, 2009 at 01:58:19PM +0200, Gleb Natapov wrote: > Signed-off-by: Gleb Natapov > diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c > index 04aecc2..a6d57e5 100644 > --- a/qemu/hw/pci.c > +++ b/qemu/hw/pci.c > @@ -213,7 +213,7 @@ static void pci_unregister_io_regions(PCIDevice *pci_dev) > > for(i = 0; i < PCI_NUM_REGIONS; i++) { > r = &pci_dev->io_regions[i]; > - if (!r->size) > + if (!r->size || r->addr == -1) > continue; > if (r->type == PCI_ADDRESS_SPACE_IO) { > isa_unassign_ioport(r->addr, r->size); > -- > Gleb. ACK, please apply.