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

[Xen-changelog] [xen-unstable] x86: Correctly allocate module-relocation area and bzimage headroom.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259677168 0
# Node ID aae0afcc05e38a378e43fe5f399a8138291cab55
# Parent  88cdcc8dc17ac814827fc93c07bc8ecd871516b6
x86: Correctly allocate module-relocation area and bzimage headroom.

Without this patch, loading a bzimage dom0 kernel while also
requesting a dynamically-allocated crashkernel area is broken.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/setup.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff -r 88cdcc8dc17a -r aae0afcc05e3 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Tue Dec 01 14:08:27 2009 +0000
+++ b/xen/arch/x86/setup.c      Tue Dec 01 14:19:28 2009 +0000
@@ -762,11 +762,9 @@ void __init __start_xen(unsigned long mb
              ((e-s) >= (modules_length+modules_headroom)) )
         {
             initial_images_end = e;
-            e = (e - modules_length) & PAGE_MASK;
-            initial_images_start = e;
-            e -= modules_headroom;
-            initial_images_base = e;
-            e += modules_length + modules_headroom;
+            initial_images_start = initial_images_end - modules_length;
+            initial_images_base = initial_images_start - modules_headroom;
+            initial_images_base &= PAGE_MASK;
             for ( j = mbi->mods_count-1; j >= 0; j-- )
             {
                 e -= mod[j].mod_end - mod[j].mod_start;
@@ -774,6 +772,7 @@ void __init __start_xen(unsigned long mb
                 mod[j].mod_end += e - mod[j].mod_start;
                 mod[j].mod_start = e;
             }
+            e = initial_images_base;
         }
 
         if ( !kexec_crash_area.start && (s < e) &&

_______________________________________________
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®.