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-changelog

[Xen-changelog] [xen-unstable] x86_32: Respect e820 map when populating

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86_32: Respect e820 map when populating Xen heap.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Nov 2009 00:25:12 -0800
Delivery-date: Mon, 09 Nov 2009 00:25:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1257754795 0
# Node ID 42e268da38b961ed8b9edf02308a8a85d4456bf3
# Parent  f8a320c333e8f06d573aaea5aa5bb466462840ff
x86_32: Respect e820 map when populating Xen heap.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/setup.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff -r f8a320c333e8 -r 42e268da38b9 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Mon Nov 09 08:03:30 2009 +0000
+++ b/xen/arch/x86/setup.c      Mon Nov 09 08:19:55 2009 +0000
@@ -931,8 +931,17 @@ void __init __start_xen(unsigned long mb
 
 #if defined(CONFIG_X86_32)
     /* Initialise the Xen heap. */
-    init_xenheap_pages(xenheap_initial_phys_start, xenheap_phys_end);
-    nr_pages = (xenheap_phys_end - xenheap_initial_phys_start) >> PAGE_SHIFT;
+    for ( nr_pages = i = 0; i < boot_e820.nr_map; i++ )
+    {
+        uint64_t s = boot_e820.map[i].addr;
+        uint64_t e = s + boot_e820.map[i].size;
+        s = max_t(uint64_t, s, xenheap_initial_phys_start);
+        e = min_t(uint64_t, e, xenheap_phys_end);
+        if ( (boot_e820.map[i].type != E820_RAM) || (s >= e) )
+            continue;
+        init_xenheap_pages(s, e);
+        nr_pages += (e - s) >> PAGE_SHIFT;
+    }
     printk("Xen heap: %luMB (%lukB)\n", 
            nr_pages >> (20 - PAGE_SHIFT),
            nr_pages << (PAGE_SHIFT - 10));

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86_32: Respect e820 map when populating Xen heap., Xen patchbot-unstable <=