Re: [PATCH v3 04/21] kho: return virtual address of mem_map

Pratyush Yadav <[email protected]> Fri, 24 Jul 2026 18:45:49 +0200
Newsgroups org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Wed, Jul 15 2026, Mike Rapoport wrote:

>> kho: return virtual address of mem_map
>
> It's not really clear from where ...
>
>> Currently it is only used by kho_populate(), which doesn't care whether
>
> ... and where it is used ;-)

Here's what I changed the whole thing to:

    kho: return virtual address of mem_map from kho_get_mem_map()

    Currently the preserved memory map address is returned by
    kho_get_mem_map_phys(). It is only used by kho_populate().
    kho_populate() doesn't use the actual value. It only cares that the
    address exists and is valid.

    In coming patches, more callers will be added, all of which will need
    the virtual address of the preserved memory map. Since kho_populate()
    doesn't care about the actual value and only cares about validity, it
    can also use the virtual address returned by kho_get_mem_map(). It only
    needs to make sure the returned value is not NULL.

    Rename kho_get_mem_map_phys() to kho_get_mem_map() and return the
    virtual address of the preserved memory map.

-- 
Regards,
Pratyush Yadav