aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/setup.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-07-14 09:26:13 +0100
committerJan Beulich <jbeulich@novell.com>2011-07-14 09:26:13 +0100
commitd0ae97d4136e0e2163c7f559a077d66947c3c2dd (patch)
tree17704d5d2bac3011ed00b724ce6326bc4114768a /xen/arch/x86/setup.c
parent7844f90abd551f6d5cd9b670b5ed8a4683258a21 (diff)
downloadxen-d0ae97d4136e0e2163c7f559a077d66947c3c2dd.tar.gz
xen-d0ae97d4136e0e2163c7f559a077d66947c3c2dd.tar.bz2
xen-d0ae97d4136e0e2163c7f559a077d66947c3c2dd.zip
x86-64: properly handle alias mappings beyond _end
Changeset 19632:b0966b6f5180 wasn't really complete: The Xen image mapping doesn't end at _end, but a full 16Mb gets mapped during boot (and never got unmapped so far), hence all of this space was subject to alias mappings when it comes to cache attribute changes. Unmap all full large pages between _end and the 16Mb boundary, and include all other pages beyond _end when checking for aliases. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/setup.c')
-rw-r--r--xen/arch/x86/setup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index a7d132a250..c2a2aaab56 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -94,6 +94,8 @@ unsigned long __read_mostly xen_phys_start;
/* Limits of Xen heap, used to initialise the allocator. */
unsigned long __initdata xenheap_initial_phys_start;
unsigned long __read_mostly xenheap_phys_end;
+#else
+unsigned long __read_mostly xen_virt_end;
#endif
DEFINE_PER_CPU(struct tss_struct, init_tss);
@@ -1094,6 +1096,9 @@ void __init __start_xen(unsigned long mbi_p)
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);
#endif
memguard_init();