Re: BUG: 1bbbbe7 (x86: Exclude E820_RESERVED regions...) PANIC on boot

From: Yinghai Lu
Date: Mon Oct 22 2012 - 14:05:22 EST


On Mon, Oct 22, 2012 at 7:40 AM, Jacob Shin <jacob.shin@xxxxxxx> wrote:
> On Sun, Oct 21, 2012 at 02:23:58PM -0700, Tom Rini wrote:
>> On 10/21/12 14:06, Jacob Shin wrote:
>> > Ah, sorry, this one should apply on top of 3.7-rc2:
>> >
>> > https://lkml.org/lkml/2012/8/24/469
>> >
>> > Could you try that? Just that single patch, not the whole patchset.
>>
>> That fixes it, replied with a note and Tested-by, thanks!
>
> Thanks for testing!
>
> hpa, so sorry, but it looks like we need one more patch [PATCH 2/5] x86:
> find_early_table_space based on memory ranges that are being mapped:
>
> https://lkml.org/lkml/2012/8/24/469
>
> on top of this, because find_early_table_space calculation does not come out
> correctly for this particular E820 table that Tom has:
>
> http://pastebin.com/4eSPEAvB
>
> The reason why we hit this now, and never hit it before is because before the
> start was hard coded to 1UL<<32.
>

I'm afraid that we may need add more patches to make v3.7 really
handle every corner case.

During testing, I found more problem:
1. E820_RAM and E820_RESEVED_KERN
EFI change some E820_RAM to E820_RESREVED_KERN to cover
efi setup_data. and will pass to e820_saved, to next kexec-ed kernel.
So we can use E820_RAM to loop it, and should still E820_RAM and
E820_RESERVED_KERN combined.
otherwise will render page table with small pages, or every some partial
is not covered.
So i change to for_each_mem_pfn_range(), we fill the memblock with
E820_RAM and E820_RESERVED_KERN, and memblock will merge
range together, that will make mapping still use big page size.

2. partial page:
E820 or user could pass memmap that is not page aligned.
old cold will guarded by max_low_pfn and max_pfn. so the end partial
page will be trimmed down, and memblock can one use it.
middle partial page will still get covered by directly mapping, and
memblock still can use them.
Now we will not map middle partial page and memblock still try to use it
we could get panic when accessing those pages.

So I would suggest to just revert that temporary patch at this time,
and later come out one complete patch for stable kernels.

Thanks

Yinghai
--
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/