From: Jeremy Fitzhardinge Date: Mon, 16 Jun 2008 21:54:46 +0000 (-0700) Subject: xen: reserve Xen-specific memory in e820 map X-Git-Tag: v2.6.27-rc1~1106^2~225 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=be5bf9fa1c327fa6fd6e7ba44665437dd558dfe3;p=linux-2.6-omap-h63xx.git xen: reserve Xen-specific memory in e820 map Signed-off-by: Jeremy Fitzhardinge Cc: Yinghai Lu Cc: the arch/x86 maintainers Signed-off-by: Ingo Molnar Cc: Yinghai Lu Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index a2957580320..dc2ca8ad360 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -40,9 +40,22 @@ char * __init xen_memory_setup(void) max_pfn = min(MAX_DOMAIN_PAGES, max_pfn); e820.nr_map = 0; + e820_add_region(0, LOWMEMSIZE(), E820_RAM); e820_add_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM); + /* + * Reserve Xen bits: + * - mfn_list + * - xen_start_info + * See comment above "struct start_info" in + */ + e820_add_region(__pa(xen_start_info->mfn_list), + xen_start_info->pt_base - xen_start_info->mfn_list, + E820_RESERVED); + + sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); + return "Xen"; }