pvgrub: fix crash when booting kernel with p2m list outside kernel mapping

When trying to boot a kernel with the p2m list not mapped by the
initial kernel mapping it can happen that pvgrub is failing as it is
keeping some page tables mapped.

Unmap the additional page tables created for the special p2m mapping
will avoid this failure.

Reported-by: Sven Koehler <sven.koehler@gmail.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
master commit: 9714f6b87e
master date: 2016-09-28 11:29:28 +0100
This commit is contained in:
Juergen Gross authored and Jan Beulich committed 2016-12-13 14:25:52 +01:00
1 parent e0ea04d1e6
commit 7a71cea02a
1 file changed
+2
+2
View File
@@ -347,6 +347,8 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char
/* Unmap libxc's projection of the boot page table */
seg = xc_dom_seg_to_ptr(dom, &dom->pgtables_seg);
munmap(seg, dom->pgtables_seg.vend - dom->pgtables_seg.vstart);
seg = xc_dom_seg_to_ptr(dom, &dom->p2m_seg);
munmap(seg, dom->p2m_seg.vend - dom->p2m_seg.vstart);
/* Unmap day0 pages to avoid having a r/w mapping of the future page table */
for (pfn = 0; pfn < allocated; pfn++)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.