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] Always free the lowest 1MB of pseudo-physical memory whe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Always free the lowest 1MB of pseudo-physical memory when booting
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Aug 2005 15:48:14 +0000
Delivery-date: Wed, 24 Aug 2005 15:46:40 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 8ba397608f1c68003be17e6d01ec2acef7463af6
# Parent  c42a9e2f6c5b270cbcbfc9b918de9b66750448b3
Always free the lowest 1MB of pseudo-physical memory when booting
a guest.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r c42a9e2f6c5b -r 8ba397608f1c 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c       Wed Aug 24 
15:22:44 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c       Wed Aug 24 
15:46:33 2005
@@ -428,8 +428,9 @@
 {
         unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn);
         free_bootmem(0, end_pfn << PAGE_SHIFT);   
-        /* XXX KAF: Why can't we leave low 1MB of memory free? */
-        reserve_bootmem(0, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1));
+        reserve_bootmem(HIGH_MEMORY,
+                        (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1)
+                        - HIGH_MEMORY);
 }
 #else
 static void __init contig_initmem_init(void)
diff -r c42a9e2f6c5b -r 8ba397608f1c 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h  
Wed Aug 24 15:22:44 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h  
Wed Aug 24 15:46:33 2005
@@ -8,23 +8,12 @@
 
 static char * __init machine_specific_memory_setup(void)
 {
-       char *who;
-       unsigned long start_pfn, max_pfn;
-
-       who = "Xen";
-
-       /* In dom0, we have to start the fake e820 map above the first
-        * 1MB, in other domains, it can start at 0. */
-       if (xen_start_info.flags & SIF_INITDOMAIN)
-               start_pfn = 0x100;
-       else
-               start_pfn = 0;
-       max_pfn = xen_start_info.nr_pages;
+       unsigned long max_pfn = xen_start_info.nr_pages;
 
        e820.nr_map = 0;
-       add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - 
PFN_PHYS(start_pfn), E820_RAM);
+       add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
 
-       return who;
+       return "Xen";
 }
 
 void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Always free the lowest 1MB of pseudo-physical memory when booting, Xen patchbot -unstable <=