diff --git a/hw/pass-through.c b/hw/pass-through.c index 7b46234..a42bb20 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -1424,6 +1424,10 @@ static void pt_unregister_regions(struct pt_dev *assigned_device) if ( e_size == 0 ) continue; + /* avoid unmapping for invalid physbase */ + if ( assigned_device->bases[i].e_physbase == -1 ) + continue; + type = d->io_regions[i].type; if ( type == PCI_ADDRESS_SPACE_MEM ||