From eb897a14172389d691ffb8830f17ef46c375644a Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Tue, 16 Oct 2007 11:51:31 -0700 Subject: [PATCH] --- yaml --- r: 70931 b: refs/heads/master c: fb1d84043ca73212b08ff57608f51b372529e6d6 h: refs/heads/master i: 70929: f665324e255c6583a9f4271d6ed4887fb51c05a1 70927: 16f0bf9910ed3af11e181ca437c402af1207236a v: v3 --- [refs] | 2 +- trunk/arch/x86/xen/enlighten.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 51066c0e4ce1..aa14b058e3dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 74260714c56de4f967fcb2f17a8656bc574b75be +refs/heads/master: fb1d84043ca73212b08ff57608f51b372529e6d6 diff --git a/trunk/arch/x86/xen/enlighten.c b/trunk/arch/x86/xen/enlighten.c index 4186cb6a7f5a..bc7bf5f8d077 100644 --- a/trunk/arch/x86/xen/enlighten.c +++ b/trunk/arch/x86/xen/enlighten.c @@ -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);