ia64/xen-unstable

changeset 6394:8ba397608f1c

Always free the lowest 1MB of pseudo-physical memory when booting
a guest.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Aug 24 15:46:33 2005 +0000 (2005-08-24)
parents c42a9e2f6c5b
children d1ac7c6ffb63
files linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Wed Aug 24 15:22:44 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Wed Aug 24 15:46:33 2005 +0000
     1.3 @@ -428,8 +428,9 @@ static void __init contig_initmem_init(v
     1.4  {
     1.5          unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn);
     1.6          free_bootmem(0, end_pfn << PAGE_SHIFT);   
     1.7 -        /* XXX KAF: Why can't we leave low 1MB of memory free? */
     1.8 -        reserve_bootmem(0, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1));
     1.9 +        reserve_bootmem(HIGH_MEMORY,
    1.10 +                        (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1)
    1.11 +                        - HIGH_MEMORY);
    1.12  }
    1.13  #else
    1.14  static void __init contig_initmem_init(void)
     2.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h	Wed Aug 24 15:22:44 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h	Wed Aug 24 15:46:33 2005 +0000
     2.3 @@ -8,23 +8,12 @@
     2.4  
     2.5  static char * __init machine_specific_memory_setup(void)
     2.6  {
     2.7 -	char *who;
     2.8 -	unsigned long start_pfn, max_pfn;
     2.9 -
    2.10 -	who = "Xen";
    2.11 -
    2.12 -	/* In dom0, we have to start the fake e820 map above the first
    2.13 -	 * 1MB, in other domains, it can start at 0. */
    2.14 -	if (xen_start_info.flags & SIF_INITDOMAIN)
    2.15 -		start_pfn = 0x100;
    2.16 -	else
    2.17 -		start_pfn = 0;
    2.18 -	max_pfn = xen_start_info.nr_pages;
    2.19 +	unsigned long max_pfn = xen_start_info.nr_pages;
    2.20  
    2.21  	e820.nr_map = 0;
    2.22 -	add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM);
    2.23 +	add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
    2.24  
    2.25 -	return who;
    2.26 +	return "Xen";
    2.27  }
    2.28  
    2.29  void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)