lkml.org 
[lkml]   [2008]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] xen: boot via i386_start_kernel to get early reservations
On Sat, May 24, 2008 at 2:49 AM, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> Boot Xen via i386_start_kernel so that all the early reservations are
> made properly; without these, it will start using the kernel and
> pagetables as early heap memory, which is a bit suboptimal.
>
> One tricky part is that reserve_early() will just panic if any of the
> early reservations overlap any others. When a Xen domain is built, it
> constructs the initial address space as:
>
> kernel text+data+bss
> initrd
> initial pagetable
>
> Therefore, when reserving the pagetable (from &_end to
> init_pg_tables_end), it covers the whole initrd area. If it then
> tries to reserve the initrd, it will panic because of the overlap.
>
> The simple fix here is to reserve INIT_PG_TABLE first, and then only
> reserve the ramdisk if it doesn't overlap with the previous
> reservations. A better/more complex fix might be to make
> reserve_early() deal with overlapping reservations.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> ---
...
> ===================================================================
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1264,5 +1264,5 @@ asmlinkage void __init xen_start_kernel(
> }
>
> /* Start the world */
> - start_kernel();
> + i386_start_kernel();
> }
..

need to do the same thing in arch/x86/lguest.c::lguest_init

YH


\
 
 \ /
  Last update: 2008-05-25 00:07    [W:0.386 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site