Re: [PATCH] x86: extend e820 ealy_res support 32bit - fix #2
From: Yinghai Lu
Date: Tue May 27 2008 - 17:35:48 EST
On Tue, May 27, 2008 at 2:22 PM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> Yinghai Lu wrote:
>>
>> Can you send out your boot log?
>>
>
> I've included it below.
>
>> I still can not figure out INIT_PG_TABLE and RAMDISK could overlap? or
>> only one byte? or the same page?
>>
>
> Perhaps my explanation in the patch description wasn't clear enough.
>
> When Xen builds the domain, it's responsible for layout of the kernel, the
> initrd and the initial pagetable (the kernel does not create its own
> pagetable like it does when booting directly on x86).
>
> The layout is (from low to high addresses):
>
> kernel start ->+-------+
> |.text |
> + - - - +
> |.data |
> + - - - +
> |.bss |
> _end->+-------+
> :padding:
> +-------+<-ramdisk_image
> : :
> |initrd |
> : :
> +-------+<-ramdisk_end
> :padding:
> +-------+
> |pgtable|
> init_pg_tables_end->+-------+
>
>
> Therefore, when you call early_reserve(&end, init_pg_tables_end) to reserve
> the inital pagetable, you also implicitly reserve the whole ramdisk area.
> Since your code currently reserves the ramdisk first, the reservation of
> the pagetable fails because it overlaps the ramdisk.
>
> My patch does two things:
>
> 1. reserve the initial pagetable first
> 2. skip reserving the ramdisk if it is within the pagetable range
>
> This makes sure that all the important memory is reserved from early in
> boot.
>
> There are two alternate fixes:
>
> 1. try to precisely reserve *just* the pagetable, rather than
> assuming it starts at &_end. I'm not sure there's currently a way
> to do this, but it would be easy enough to add. Or,
> 2. Make early reservation cope with overlapping ranges, and deal with
> them appropriately.
thanks for the explanation...
method 1 need to be done.
BTW, XEN PV only support 32 bit?
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/