Re: [PATCH 11/12] kho: return virtual address of mem_map

From: Mike Rapoport

Date: Tue May 12 2026 - 02:52:08 EST


On Mon, May 11, 2026 at 06:48:37PM +0200, Pratyush Yadav wrote:
> On Mon, May 11 2026, Mike Rapoport wrote:
>
> > On Wed, Apr 29, 2026 at 03:39:13PM +0200, Pratyush Yadav wrote:
> >> From: "Pratyush Yadav (Google)" <pratyush@xxxxxxxxxx>
> >>
> >> There are currently 3 callers of kho_get_mem_map_phys(). Two of them,
> >> kho_mem_retrieve() and kho_extend_scratch() need the virtual address.
> >> The third, kho_populate() doesn't care. Make things simpler by
> >> directly returning the virtual address. Rename kho_get_mem_map_phys() to
> >> kho_get_mem_map() to accurately reflect what it returns.
> >
> > This should be moved earlier, before replacing open-coded get_mem_map()
> > with a call to kho_get_mem_map_phys().
>
> Do you mean move it before patch 2 "kho: store incoming radix tree in
> kho_in"?

Yes.

> I can do that. I did it this way to show a clear need for this function,
> but I don't mind doing it as a preparatory step.

With the usual "it will be used in the upcoming changes" text in the log
it's fine :)

> >
> >> Signed-off-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>
> >> ---
> >> kernel/liveupdate/kexec_handover.c | 28 +++++++++++++++-------------
> >> 1 file changed, 15 insertions(+), 13 deletions(-)
>
> --
> Regards,
> Pratyush Yadav

--
Sincerely yours,
Mike.