From: Keir Fraser Date: Tue, 8 Jul 2008 08:26:58 +0000 (+0100) Subject: Fix passthrough of PCI capability structures. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14188^2~87 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eabcd59fd980e9f08546ccafef56f0846122f425;p=xen.git Fix passthrough of PCI capability structures. Signed-off-by: Naoki Nishiguchi --- diff --git a/tools/ioemu/hw/pass-through.c b/tools/ioemu/hw/pass-through.c index 9facc6ae52..61ac386fa0 100644 --- a/tools/ioemu/hw/pass-through.c +++ b/tools/ioemu/hw/pass-through.c @@ -827,7 +827,7 @@ void pt_iomem_map(PCIDevice *d, int i, uint32_t e_phys, uint32_t e_size, 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,