diff -r 0d707feab01e tools/ioemu/hw/pass-through.c --- a/tools/ioemu/hw/pass-through.c Mon Jul 07 16:13:53 2008 +0100 +++ b/tools/ioemu/hw/pass-through.c Tue Jul 08 11:27:48 2008 +0900 @@ -827,7 +827,7 @@ void pt_iomem_map(PCIDevice *d, int i, u if ( e_size == 0 ) return; - if ( !first_map ) + if ( !first_map && old_ebase != -1 ) { add_msix_mapping(assigned_device, i); /* Remove old mapping */ @@ -883,7 +883,7 @@ void pt_ioport_map(PCIDevice *d, int i, if ( e_size == 0 ) return; - if ( !first_map ) + if ( !first_map && old_ebase != -1 ) { /* Remove old mapping */ ret = xc_domain_ioport_mapping(xc_handle, domid, old_ebase,