[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.4-testing] x86_32: Respect e820 map when populating Xen heap.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |