]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
xen: ask the hypervisor how much space it needs reserved
authorJeremy Fitzhardinge <jeremy@xensource.com>
Tue, 16 Oct 2007 18:51:31 +0000 (11:51 -0700)
committerJeremy Fitzhardinge <jeremy@goop.org>
Tue, 16 Oct 2007 18:51:31 +0000 (11:51 -0700)
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>
arch/x86/xen/enlighten.c

index 4186cb6a7f5a450160467005ecf7836b79b1b8cd..bc7bf5f8d077c33b1f269df8b2532345d309bf65 100644 (file)
@@ -1112,6 +1112,17 @@ static const struct machine_ops __initdata xen_machine_ops = {
 };
 
 
+static void __init xen_reserve_top(void)
+{
+       unsigned long top = HYPERVISOR_VIRT_START;
+       struct xen_platform_parameters pp;
+
+       if (HYPERVISOR_xen_version(XENVER_platform_parameters, &pp) == 0)
+               top = pp.virt_start;
+
+       reserve_top_address(-top + 2 * PAGE_SIZE);
+}
+
 /* First C function to be called on Xen boot */
 asmlinkage void __init xen_start_kernel(void)
 {
@@ -1169,7 +1180,7 @@ asmlinkage void __init xen_start_kernel(void)
                pv_info.kernel_rpl = 0;
 
        /* set the limit of our address space */
-       reserve_top_address(-HYPERVISOR_VIRT_START + 2 * PAGE_SIZE);
+       xen_reserve_top();
 
        /* set up basic CPUID stuff */
        cpu_detect(&new_cpu_data);