aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/setup.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-02-08 11:06:04 +0100
committerJan Beulich <jbeulich@suse.com>2013-02-08 11:06:04 +0100
commitf1bde87fc08ce8c818a1640a8fe4765d48923091 (patch)
tree0d70fa9de1bdfb1701df321df7dd05b13e46ce51 /xen/arch/x86/setup.c
parented759d20249197cf87b338ff0ed328052ca3b8e7 (diff)
downloadxen-f1bde87fc08ce8c818a1640a8fe4765d48923091.tar.gz
xen-f1bde87fc08ce8c818a1640a8fe4765d48923091.tar.bz2
xen-f1bde87fc08ce8c818a1640a8fe4765d48923091.zip
x86: debugging code for testing 16Tb support on smaller memory systems
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/setup.c')
-rw-r--r--xen/arch/x86/setup.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 2b9dbe3e88..7437c84db5 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -82,6 +82,11 @@ boolean_param("noapic", skip_ioapic_setup);
s8 __read_mostly xen_cpuidle = -1;
boolean_param("cpuidle", xen_cpuidle);
+#ifndef NDEBUG
+unsigned long __initdata highmem_start;
+size_param("highmem-start", highmem_start);
+#endif
+
cpumask_t __read_mostly cpu_present_map;
unsigned long __read_mostly xen_phys_start;
@@ -788,6 +793,14 @@ void __init __start_xen(unsigned long mbi_p)
modules_headroom = bzimage_headroom(bootstrap_map(mod), mod->mod_end);
bootstrap_map(NULL);
+#ifndef highmem_start
+ /* Don't allow split below 4Gb. */
+ if ( highmem_start < GB(4) )
+ highmem_start = 0;
+ else /* align to L3 entry boundary */
+ highmem_start &= ~((1UL << L3_PAGETABLE_SHIFT) - 1);
+#endif
+
for ( i = boot_e820.nr_map-1; i >= 0; i-- )
{
uint64_t s, e, mask = (1UL << L2_PAGETABLE_SHIFT) - 1;
@@ -916,6 +929,9 @@ void __init __start_xen(unsigned long mbi_p)
/* Don't overlap with other modules. */
end = consider_modules(s, e, size, mod, mbi->mods_count, j);
+ if ( highmem_start && end > highmem_start )
+ continue;
+
if ( s < end &&
(headroom ||
((end - size) >> PAGE_SHIFT) > mod[j].mod_start) )
@@ -957,6 +973,8 @@ void __init __start_xen(unsigned long mbi_p)
kexec_reserve_area(&boot_e820);
setup_max_pdx();
+ if ( highmem_start )
+ xenheap_max_mfn(PFN_DOWN(highmem_start));
/*
* Walk every RAM region and map it in its entirety (on x86/64, at least)
@@ -1128,7 +1146,8 @@ void __init __start_xen(unsigned long mbi_p)
unsigned long limit = virt_to_mfn(HYPERVISOR_VIRT_END - 1);
uint64_t mask = PAGE_SIZE - 1;
- xenheap_max_mfn(limit);
+ if ( !highmem_start )
+ xenheap_max_mfn(limit);
/* Pass the remaining memory to the allocator. */
for ( i = 0; i < boot_e820.nr_map; i++ )