From: Keir Fraser Date: Wed, 20 Aug 2008 08:09:28 +0000 (+0100) Subject: Fix unmapping issue on hot-removing pass-thru device X-Git-Tag: xen-3.3.0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9fb12c7d45b5ffec154fa666c9ea9814f7c409a4;p=qemu-xen-3.3-testing.git Fix unmapping issue on hot-removing pass-thru device Signed-off-by: Yuji Shimada --- diff --git a/hw/pass-through.c b/hw/pass-through.c index b1e18e08..51d0a129 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -1421,7 +1421,7 @@ static void pt_unregister_regions(struct pt_dev *assigned_device) for ( i = 0; i < PCI_NUM_REGIONS; i++ ) { e_size = assigned_device->bases[i].e_size; - if ( e_size == 0 ) + if ( (e_size == 0) || (assigned_device->bases[i].e_physbase == -1) ) continue; type = d->io_regions[i].type;