[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/64: Fix a user of alloc_boot_pages() who should use



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172183260 0
# Node ID da37c365b375fbf6335c5d7cdf5429f2bf1259d0
# Parent  3746b3d4f3010d208958e8fce74fe4ae52b0b35f
x86/64: Fix a user of alloc_boot_pages() who should use
alloc_boot_low_pages() instead.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/setup.c     |    9 +++++++--
 xen/arch/x86/x86_64/mm.c |    3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff -r 3746b3d4f301 -r da37c365b375 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Thu Feb 22 15:26:21 2007 +0000
+++ b/xen/arch/x86/setup.c      Thu Feb 22 22:27:40 2007 +0000
@@ -476,7 +476,7 @@ void __init __start_xen(multiboot_info_t
             s = initial_images_end;
         init_boot_pages(s, e);
 
-#if defined (CONFIG_X86_64)
+#if defined(CONFIG_X86_64)
         /*
          * x86/64 maps all registered RAM. Points to note:
          *  1. The initial pagetable already maps low 1GB, so skip that.
@@ -532,7 +532,12 @@ void __init __start_xen(multiboot_info_t
         k = ((initial_images_end - initial_images_start) & ~PAGE_MASK) ? 1 : 0;
         k += (initial_images_end - initial_images_start) >> PAGE_SHIFT;
 
-        k = alloc_boot_low_pages(k, 1);
+#if defined(CONFIG_X86_32)
+        /* Must allocate within bootstrap 1:1 limits. */
+        k = alloc_boot_low_pages(k, 1); /* 0x0 - HYPERVISOR_VIRT_START */
+#else
+        k = alloc_boot_pages(k, 1);
+#endif
         if ( k == 0 )
             panic("Unable to allocate initial images memory\n");
 
diff -r 3746b3d4f301 -r da37c365b375 xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  Thu Feb 22 15:26:21 2007 +0000
+++ b/xen/arch/x86/x86_64/mm.c  Thu Feb 22 22:27:40 2007 +0000
@@ -44,7 +44,8 @@ struct page_info *alloc_xen_pagetable(vo
     if ( !early_boot )
         return alloc_domheap_page(NULL);
 
-    pfn = alloc_boot_pages(1, 1);
+    /* Early pagetables must come from low 1GB of memory. */
+    pfn = alloc_boot_low_pages(1, 1); /* 0x0 - 0x40000000 */
     return ((pfn == 0) ? NULL : mfn_to_page(pfn));
 }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.