aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@xensource.com>2007-10-16 14:51:31 -0400
committerJeremy Fitzhardinge <jeremy@goop.org>2007-10-16 14:51:31 -0400
commitfb1d84043ca73212b08ff57608f51b372529e6d6 (patch)
tree7095ab1129588c184984524bdc24b6fbce181605 /arch/x86/xen
parent74260714c56de4f967fcb2f17a8656bc574b75be (diff)
xen: ask the hypervisor how much space it needs reserved
Ask the hypervisor how much space it needs reserved, since 32-on-64 doesn't need any space, and it may change in future. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 4186cb6a7f5a..bc7bf5f8d077 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1112,6 +1112,17 @@ static const struct machine_ops __initdata xen_machine_ops = {
1112}; 1112};
1113 1113
1114 1114
1115static void __init xen_reserve_top(void)
1116{
1117 unsigned long top = HYPERVISOR_VIRT_START;
1118 struct xen_platform_parameters pp;
1119
1120 if (HYPERVISOR_xen_version(XENVER_platform_parameters, &pp) == 0)
1121 top = pp.virt_start;
1122
1123 reserve_top_address(-top + 2 * PAGE_SIZE);
1124}
1125
1115/* First C function to be called on Xen boot */ 1126/* First C function to be called on Xen boot */
1116asmlinkage void __init xen_start_kernel(void) 1127asmlinkage void __init xen_start_kernel(void)
1117{ 1128{
@@ -1169,7 +1180,7 @@ asmlinkage void __init xen_start_kernel(void)
1169 pv_info.kernel_rpl = 0; 1180 pv_info.kernel_rpl = 0;
1170 1181
1171 /* set the limit of our address space */ 1182 /* set the limit of our address space */
1172 reserve_top_address(-HYPERVISOR_VIRT_START + 2 * PAGE_SIZE); 1183 xen_reserve_top();
1173 1184
1174 /* set up basic CPUID stuff */ 1185 /* set up basic CPUID stuff */
1175 cpu_detect(&new_cpu_data); 1186 cpu_detect(&new_cpu_data);