aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Gross <gross@univention.de>2011-05-28 09:28:28 +0100
committerMarkus Gross <gross@univention.de>2011-05-28 09:28:28 +0100
commit5f5629809ee01aefc6e2118fe07845909f97e241 (patch)
tree866da2e4f094b09c11193b2d81cc937b8010ad9b
parent6d4512d84a9a78e865e663d82813f4b4e56dfba1 (diff)
downloadxen-5f5629809ee01aefc6e2118fe07845909f97e241.tar.gz
xen-5f5629809ee01aefc6e2118fe07845909f97e241.tar.bz2
xen-5f5629809ee01aefc6e2118fe07845909f97e241.zip
libxc: obtain correct length of p2m during core dumping
while implementing core dumping functionality for the libxl driver of libvirt, I discovered an issue with mapping pages of a pv guest. After dumping the core of a pv guest the domain was not cleared up properly and some pages were not unmapped. This issue is similar to the one reported here: http://lists.xensource.com/archives/html/xen-devel/2011-05/msg01314.html In xc_domain_dumpcore_via_callback in the file xc_core.c the function xc_core_arch_map_p2m is called to map P2M_FL_ENTRIES pages to the variable p2m. But to unmap the pages later, the dinfo->p2m_size has to be set accordingly. This was not done, instead a variable named p2m_size was set. This way P2M_FL_ENTRIES was always zero and the pages were left mapped. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> xen-unstable changeset: 23374:8bd7b5e98f2a xen-unstable date: Tue May 24 15:00:16 2011 +0100
-rw-r--r--tools/libxc/xc_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c
index d5e686b7cf..4ff49a8bab 100644
--- a/tools/libxc/xc_core.c
+++ b/tools/libxc/xc_core.c
@@ -448,7 +448,6 @@ xc_domain_dumpcore_via_callback(int xc_handle,
int auto_translated_physmap;
xen_pfn_t *p2m = NULL;
- unsigned long p2m_size = 0;
struct xen_dumpcore_p2m *p2m_array = NULL;
uint64_t *pfn_array = NULL;
@@ -549,7 +548,7 @@ xc_domain_dumpcore_via_callback(int xc_handle,
}
sts = xc_core_arch_map_p2m(xc_handle, dinfo->guest_width, &info, live_shinfo,
- &p2m, &p2m_size);
+ &p2m, &dinfo->p2m_size);
if ( sts != 0 )
goto out;
}