* [PATCH] pvgrub: fix crash when booting kernel with p2m list outside kernel mapping
@ 2016-09-28 4:02 Juergen Gross
2016-09-28 10:49 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2016-09-28 4:02 UTC (permalink / raw)
To: xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2
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>
---
This is a backport candidate for 4.7
---
stubdom/grub/kexec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/stubdom/grub/kexec.c b/stubdom/grub/kexec.c
index 2ed4f6c..437a0a9 100644
--- a/stubdom/grub/kexec.c
+++ b/stubdom/grub/kexec.c
@@ -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++)
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-28 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 4:02 [PATCH] pvgrub: fix crash when booting kernel with p2m list outside kernel mapping Juergen Gross
2016-09-28 10:49 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).