Re: [PATCH] xen: boot via i386_start_kernel to get early reservations
- From: "Yinghai Lu" <yhlu.kernel@xxxxxxxxx>
- Date: Sat, 24 May 2008 15:04:32 -0700
On Sat, May 24, 2008 at 2:49 AM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> 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@xxxxxxxxxx>
---
===================================================================..
--- 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] x86: make e820.c to have common functions
- From: Yinghai Lu
- [PATCH] x86: extend e820 ealy_res support 32bit
- From: Yinghai Lu
- [PATCH] x86: extend e820 ealy_res support 32bit - fix
- From: Yinghai Lu
- [PATCH] x86: extend e820 ealy_res support 32bit - fix v2
- From: Yinghai Lu
- Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix v2
- From: Jeremy Fitzhardinge
- [PATCH] xen: boot via i386_start_kernel to get early reservations
- From: Jeremy Fitzhardinge
- [PATCH] x86: make e820.c to have common functions
- Prev by Date: Re: linux-next: Tree for May 22
- Next by Date: Re: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts
- Previous by thread: [PATCH] xen: boot via i386_start_kernel to get early reservations
- Next by thread: Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix v2
- Index(es):
Relevant Pages
|