Skip to contentSkip to conversation

limit Xen heap size to 2Gb

PATCH New Jan Beulich 1 participant 1 message Sep 21, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 limit Xen heap size to 2Gb

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

xen/arch/x86/setup.c +7 -0
Index: 2006-09-11/xen/arch/x86/setup.c
===================================================================
@@ -273,6 +273,13 @@ void __init __start_xen(multiboot_info_t
         EARLY_FAIL();
     }
 
+    /*
+     * Since there are some stubs getting built on the stacks which use
+     * direct calls/jumps, the heap must be confined to the lower 2G so
+     * that those branches can reach their targets.
+     */
+    if ( opt_xenheap_megabytes > 2048 )
+        opt_xenheap_megabytes = 2048;
     xenheap_phys_end = opt_xenheap_megabytes << 20;
 
     if ( mbi->flags & MBI_MEMMAP )