lkml.org 
[lkml]   [2007]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 09/12] 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>

    ---
    arch/x86/xen/enlighten.c | 13 ++++++++++++-
    1 file changed, 12 insertions(+), 1 deletion(-)

    ===================================================================
    --- a/arch/x86/xen/enlighten.c
    +++ b/arch/x86/xen/enlighten.c
    @@ -1085,6 +1085,17 @@ static const struct machine_ops __initda
    };


    +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)
    {
    @@ -1134,7 +1145,7 @@ asmlinkage void __init xen_start_kernel(
    paravirt_ops.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);
    --

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-10-15 23:55    [W:0.021 / U:91.752 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site