[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86802c440805241504v56f1d3ccud895c1c4fd0d51ef@mail.gmail.com>
Date: Sat, 24 May 2008 15:04:32 -0700
From: "Yinghai Lu" <yhlu.kernel@...il.com>
To: "Jeremy Fitzhardinge" <jeremy@...p.org>,
"Rusty Russell" <rusty@...tcorp.com.au>,
"Ingo Molnar" <mingo@...e.hu>
Cc: "Thomas Gleixner" <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xen: boot via i386_start_kernel to get early reservations
On Sat, May 24, 2008 at 2:49 AM, Jeremy Fitzhardinge <jeremy@...p.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@...rix.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists