aboutsummaryrefslogtreecommitdiff
path: root/hw/xen/xen_pt.h
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2015-10-11 23:19:24 +0800
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-10-26 11:32:18 +0000
commit4e494de66800747446e73b5ec0189ad7f4690908 (patch)
tree2d12bc4ae4b77bcd1275fd0e0bf694a0cfb292ec /hw/xen/xen_pt.h
parentaf25e7277d3e95a3ea31023f31d8097ab5e2ac84 (diff)
Qemu/Xen: Fix early freeing MSIX MMIO memory region
msix->mmio is added to XenPCIPassthroughState's object as property. object_finalize_child_property is called for XenPCIPassthroughState's object, which calls object_property_del_all, which is going to try to delete msix->mmio. object_finalize_child_property() will access msix->mmio's obj. But the whole msix struct has already been freed by xen_pt_msix_delete. This will cause segment fault when msix->mmio has been overwritten. This patch is to fix the issue. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/xen/xen_pt.h')
-rw-r--r--hw/xen/xen_pt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h
index 3bc22eb1d1..c545280085 100644
--- a/hw/xen/xen_pt.h
+++ b/hw/xen/xen_pt.h
@@ -305,6 +305,7 @@ void xen_pt_msi_disable(XenPCIPassthroughState *s);
int xen_pt_msix_init(XenPCIPassthroughState *s, uint32_t base);
void xen_pt_msix_delete(XenPCIPassthroughState *s);
+void xen_pt_msix_unmap(XenPCIPassthroughState *s);
int xen_pt_msix_update(XenPCIPassthroughState *s);
int xen_pt_msix_update_remap(XenPCIPassthroughState *s, int bar_index);
void xen_pt_msix_disable(XenPCIPassthroughState *s);