xen/23676-x86_64-image-map-bounds.patch
Charles Arnold 800917b5a2 - bnc#717650 - Unable to start VM
- Update to Xen 4.1.2_rc2 c/s 23152

- bnc#716695 - domUs using tap devices will not start
  updated multi-xvdp.patch

- Upstream patches from Jan
  23803-intel-pmu-models.patch
  23800-x86_64-guest-addr-range.patch
  23795-intel-ich10-quirk.patch
  23804-x86-IPI-counts.patch 

- bnc#706106 - Inconsistent reporting of VM names during migration
  xend-migration-domname-fix.patch

- bnc#712823 - L3:Xen guest does not start reliable when rebooted
  xend-vcpu-affinity-fix.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=143
2011-09-15 21:43:21 +00:00

66 lines
2.7 KiB
Diff

# HG changeset patch
# User Jan Beulich <jbeulich@novell.com>
# Date 1310631973 -3600
# Node ID 80c9db90bba96e443a22d268c06948fdef9c6a75
# Parent 88823213a4780ebced6d7adcb1ffd2dda6a339ca
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>
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
===================================================================
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
@@ -776,7 +776,7 @@ static int update_xen_mappings(unsigned
int err = 0;
#ifdef __x86_64__
bool_t alias = mfn >= PFN_DOWN(xen_phys_start) &&
- mfn < PFN_UP(xen_phys_start + (unsigned long)_end - XEN_VIRT_START);
+ mfn < PFN_UP(xen_phys_start + xen_virt_end - XEN_VIRT_START);
unsigned long xen_va =
XEN_VIRT_START + ((mfn - PFN_DOWN(xen_phys_start)) << PAGE_SHIFT);
Index: xen-4.1.2-testing/xen/arch/x86/setup.c
===================================================================
--- xen-4.1.2-testing.orig/xen/arch/x86/setup.c
+++ xen-4.1.2-testing/xen/arch/x86/setup.c
@@ -99,6 +99,8 @@ unsigned long __read_mostly xen_phys_sta
/* 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);
@@ -1098,6 +1100,9 @@ void __init __start_xen(unsigned long mb
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();
Index: xen-4.1.2-testing/xen/include/asm-x86/x86_64/page.h
===================================================================
--- xen-4.1.2-testing.orig/xen/include/asm-x86/x86_64/page.h
+++ xen-4.1.2-testing/xen/include/asm-x86/x86_64/page.h
@@ -34,6 +34,8 @@
#include <xen/config.h>
#include <asm/types.h>
+extern unsigned long xen_virt_end;
+
extern unsigned long max_pdx;
extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask;
extern unsigned int pfn_pdx_hole_shift;