From: David Vrabel Subject: [PATCH 1/2] Revert "kexec/x86: do not map crash kernel area" Date: Wed, 8 Jan 2014 15:56:40 +0000 Message-ID: <1389196601-12219-2-git-send-email-david.vrabel@citrix.com> References: <1389196601-12219-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389196601-12219-1-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: David Vrabel , Don Slutz List-Id: xen-devel@lists.xenproject.org From: David Vrabel This reverts commit 7113a45451a9f656deeff070e47672043ed83664. The kexec code uses map_domain_page() on pages within the crash region, so this mapping is required if the crash region is within the direct map area. Wthout this revert, loading a crash kernel may cause a fatal page fault when trying to zero the first control page allocated from the crash area. The fault will occur on non-debug builds of Xen when the crash area is below 5 TiB (which will be most systems). Reported-by: Don Slutz Signed-off-by: David Vrabel --- xen/arch/x86/setup.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 4833ca3..f07ee2b 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1097,7 +1097,9 @@ void __init __start_xen(unsigned long mbi_p) mod[i].mod_start, PFN_UP(mod[i].mod_end), PAGE_HYPERVISOR); } - + map_pages_to_xen((unsigned long)__va(kexec_crash_area.start), + kexec_crash_area.start >> PAGE_SHIFT, + PFN_UP(kexec_crash_area.size), PAGE_HYPERVISOR); xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) & ~((1UL << L2_PAGETABLE_SHIFT) - 1); destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + BOOTSTRAP_MAP_BASE); -- 1.7.2.5