summaryrefslogtreecommitdiffstats
path: root/xen-hvm.c
diff options
context:
space:
mode:
authorLiang Li <liang.z.li@intel.com>2015-01-13 10:40:53 +0800
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-01-13 11:49:46 +0000
commit99605175c93a24be4aa39543cd02551ea205e614 (patch)
treead152bd34819c28d757e0dd00ec488569a884b67 /xen-hvm.c
parent7d5ad15d17f26dd4f9ff5f3491828bc34e74f28c (diff)
downloadhqemu-99605175c93a24be4aa39543cd02551ea205e614.zip
hqemu-99605175c93a24be4aa39543cd02551ea205e614.tar.gz
xen-pt: Fix PCI devices re-attach failed
Use the 'xl pci-attach $DomU $BDF' command to attach more than one PCI devices to the guest, then detach the devices with 'xl pci-detach $DomU $BDF', after that, re-attach these PCI devices again, an error message will be reported like following: libxl: error: libxl_qmp.c:287:qmp_handle_error_response: receive an error message from QMP server: Duplicate ID 'pci-pt-03_10.1' for device. If using the 'address_space_memory' as the parameter of 'memory_listener_register', 'xen_pt_region_del' will not be called if the memory region's name is not 'xen-pci-pt-*' when the devices is detached. This will cause the device's related QemuOpts object not be released properly. Using the device's address space can avoid such issue, because the calling count of 'xen_pt_region_add' when attaching and the calling count of 'xen_pt_region_del' when detaching is the same, so all the memory region ref and unref by the 'xen_pt_region_add' and 'xen_pt_region_del' can be released properly. Signed-off-by: Liang Li <liang.z.li@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reported-by: Longtao Pang <longtaox.pang@intel.com>
Diffstat (limited to 'xen-hvm.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud