WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] limit Xen heap size to 2Gb

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] limit Xen heap size to 2Gb
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 21 Sep 2006 17:37:15 +0200
Delivery-date: Thu, 21 Sep 2006 08:36:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
.. in order to avoid stub code created on the stack being unable to
reach targets in main Xen code via direct branches.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2006-09-11/xen/arch/x86/setup.c
===================================================================
--- 2006-09-11.orig/xen/arch/x86/setup.c        2006-09-18 16:11:12.000000000 
+0200
+++ 2006-09-11/xen/arch/x86/setup.c     2006-09-19 08:51:29.000000000 +0200
@@ -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 )


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] limit Xen heap size to 2Gb, Jan Beulich <=