Re: [PATCH 05/11] x86: remove HIGHMEM64G support

From: Ingo Molnar
Date: Sat Apr 12 2025 - 15:48:23 EST



* Mike Rapoport <rppt@xxxxxxxxxx> wrote:

> On Fri, Apr 11, 2025 at 04:44:13PM -0700, Dave Hansen wrote:
> > Has anyone run into any problems on 6.15-rc1 with this stuff?
> >
> > 0xf75fe000 is the mem_map[] entry for the first page >4GB. It obviously
> > wasn't allocated, thus the oops. Looks like the memblock for the >4GB
> > memory didn't get removed although the pgdats seem correct.
>
> That's apparently because of 6faea3422e3b ("arch, mm: streamline HIGHMEM
> freeing").
> Freeing of high memory was clamped to the end of ZONE_HIGHMEM which is 4G
> and after 6faea3422e3b there's no more clamping, so memblock_free_all()
> tries to free memory >4G as well.
>
> > I'll dig into it some more. Just wanted to make sure there wasn't a fix
> > out there already.
>
> This should fix it.
>
> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
> index 57120f0749cc..4b24c0ccade4 100644
> --- a/arch/x86/kernel/e820.c
> +++ b/arch/x86/kernel/e820.c
> @@ -1300,6 +1300,8 @@ void __init e820__memblock_setup(void)
> memblock_add(entry->addr, entry->size);
> }
>
> + memblock_remove(PFN_PHYS(max_pfn), -1);
> +
> /* Throw away partial pages: */
> memblock_trim_memory(PAGE_SIZE);

Mind sending a full patch with changelog, SOB, Ard's Tested-by, Dave's
Reported-by, etc.?

Thanks,

Ingo