aboutsummaryrefslogtreecommitdiff
path: root/hw/xen/xen_pt_msi.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-10-26 13:13:38 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-10-26 13:13:38 +0000
commit9666248a85fd889bfb6118f769e9c73039b998ed (patch)
tree72aa9ac89ace53b203ffbd7e4c3711ccdd98f134 /hw/xen/xen_pt_msi.c
parent251d7e60148599be685c6f9f3921aee38dccef5c (diff)
parentb1ecd51bdbb0fc0a7026662b03e7e7df9d129ca0 (diff)
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-2015-10-26' into staging
Xen 2015-10-26 # gpg: Signature made Mon 26 Oct 2015 11:32:50 GMT using RSA key ID 70E1AE90 # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" * remotes/sstabellini/tags/xen-2015-10-26: xen-platform: Replace assert() with appropriate error reporting xen_platform: switch to realize Qemu/Xen: Fix early freeing MSIX MMIO memory region Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/xen/xen_pt_msi.c')
-rw-r--r--hw/xen/xen_pt_msi.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index e3d71945cd..82de2bced3 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -610,7 +610,7 @@ error_out:
return rc;
}
-void xen_pt_msix_delete(XenPCIPassthroughState *s)
+void xen_pt_msix_unmap(XenPCIPassthroughState *s)
{
XenPTMSIX *msix = s->msix;
@@ -627,6 +627,17 @@ void xen_pt_msix_delete(XenPCIPassthroughState *s)
}
memory_region_del_subregion(&s->bar[msix->bar_index], &msix->mmio);
+}
+
+void xen_pt_msix_delete(XenPCIPassthroughState *s)
+{
+ XenPTMSIX *msix = s->msix;
+
+ if (!msix) {
+ return;
+ }
+
+ object_unparent(OBJECT(&msix->mmio));
g_free(s->msix);
s->msix = NULL;