From 9fb12c7d45b5ffec154fa666c9ea9814f7c409a4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 20 Aug 2008 09:09:28 +0100 Subject: [PATCH] Fix unmapping issue on hot-removing pass-thru device Signed-off-by: Yuji Shimada --- hw/pass-through.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5