ia64/xen-unstable

changeset 11618:ab2817b9547b

[XEN] Limit size of Xen heap to 2GB.

Avoids stub code created on the stack being unable to
reach targets in main Xen code via direct branches.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Mon Sep 25 09:31:11 2006 +0100 (2006-09-25)
parents 83b53eeb8a5c
children 807fbfb0a0dc
files xen/arch/x86/setup.c
line diff
     1.1 --- a/xen/arch/x86/setup.c	Mon Sep 25 09:29:28 2006 +0100
     1.2 +++ b/xen/arch/x86/setup.c	Mon Sep 25 09:31:11 2006 +0100
     1.3 @@ -272,6 +272,13 @@ void __init __start_xen(multiboot_info_t
     1.4          EARLY_FAIL();
     1.5      }
     1.6  
     1.7 +    /*
     1.8 +     * Since there are some stubs getting built on the stacks which use
     1.9 +     * direct calls/jumps, the heap must be confined to the lower 2G so
    1.10 +     * that those branches can reach their targets.
    1.11 +     */
    1.12 +    if ( opt_xenheap_megabytes > 2048 )
    1.13 +        opt_xenheap_megabytes = 2048;
    1.14      xenheap_phys_end = opt_xenheap_megabytes << 20;
    1.15  
    1.16      if ( mbi->flags & MBI_MEMMAP )