]> Gentwo Git Trees - linux/.git/commit
kho: add support for preserving vmalloc allocations
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Sun, 21 Sep 2025 05:44:57 +0000 (08:44 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 7 Oct 2025 20:48:55 +0000 (13:48 -0700)
commita667300bd53f272a3055238bcefe108f88836270
treeef1dc250469661a3b03770ab9ae4fb2b1012472b
parent8375b76517cb52bac0903071feedc218c45d74d2
kho: add support for preserving vmalloc allocations

A vmalloc allocation is preserved using binary structure similar to global
KHO memory tracker.  It's a linked list of pages where each page is an
array of physical address of pages in vmalloc area.

kho_preserve_vmalloc() hands out the physical address of the head page to
the caller.  This address is used as the argument to kho_vmalloc_restore()
to restore the mapping in the vmalloc address space and populate it with
the preserved pages.

[pasha.tatashin@soleen.com: free chunks using free_page() not kfree()]
Link: https://lkml.kernel.org/r/mafs0a52idbeg.fsf@kernel.org
[akpm@linux-foundation.org: coding-style cleanups]
Link: https://lkml.kernel.org/r/20250921054458.4043761-4-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Changyuan Lyu <changyuanl@google.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/kexec_handover.h
kernel/kexec_handover.c