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-3.4-testing] x86_32: Respect e820 map when populati

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86_32: Respect e820 map when populating Xen heap.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Nov 2009 00:25:24 -0800
Delivery-date: Mon, 09 Nov 2009 00:26:21 -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 1257754971 0
# Node ID c45b172dd5baf38a58b9f338de2f22cef7b44e60
# Parent  7b58e660e8b3d6789ca905242e71f97225826eeb
x86_32: Respect e820 map when populating Xen heap.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   20403:42e268da38b9
xen-unstable date:        Mon Nov 09 08:19:55 2009 +0000
---
 xen/arch/x86/setup.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff -r 7b58e660e8b3 -r c45b172dd5ba xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Mon Nov 09 08:05:32 2009 +0000
+++ b/xen/arch/x86/setup.c      Mon Nov 09 08:22:51 2009 +0000
@@ -862,8 +862,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-3.4-testing] x86_32: Respect e820 map when populating Xen heap., Xen patchbot-3.4-testing <=