Re: [BUG] KHO handover hangs when memmap reserves PMEM
From: Pratyush Yadav
Date: Sun Oct 04 2026 - 13:53:54 EST
On Sun, Oct 04 2026, Chris Bainbridge wrote:
> On Sun, Oct 04, 2026 at 03:39:25PM +0200, Pratyush Yadav wrote:
>>
>> Just to confirm, the first kernel boots without memmap= right?
>
> Yes.
>
>> I think the main problem is that the radix tree pages can be anywhere in
>> memory. So on the first kernel, they can land in an area that the second
>> kernel's memmap= reserves. So kho_memory_init() might end up using
>> memory that memmap= reserved. I'm not sure why exactly the next kernel
>> doesn't produce any output, but IIRC memmap= memory is not mapped to the
>> direct map, so accessing those pages likely causes a page fault.
>
> That's correct, kho_memory_init() page faults. It happens before the
> serial console is available, so there is no output.
Yeah, then I think you need an extra kexec with KHO off to enable
memmap=. Or I guess hot-unplug the memory you'd like to memmap= early on
first boot, which should make sure no radix tree pages land there.
Apart from that, I don't have any good ideas to properly solve this
problem.
--
Regards,
Pratyush Yadav