On Thu, Feb 5, 2026 at 9:14 PM Jason Miu <[email protected]> wrote:
>
> Introduce a radix tree implementation for tracking preserved memory
> pages and switch the KHO memory tracking mechanism to use it. This
> lays the groundwork for a stateless KHO implementation that eliminates
> the need for serialization and the associated "finalize" state.
>
> This patch introduces the core radix tree data structures and
> constants to the KHO ABI. It adds the radix tree node and leaf
> structures, along with documentation for the radix tree key encoding
> scheme that combines a page's physical address and order.
>
> To support broader use by other kernel subsystems, such as hugetlb
> preservation, the core radix tree manipulation functions are exported
> as a public API.
>
> The xarray-based memory tracking is replaced with this new radix tree
> implementation. The core KHO preservation and unpreservation functions
> are wired up to use the radix tree helpers. On boot, the second kernel
> restores the preserved memory map by walking the radix tree whose root
> physical address is passed via the FDT.
>
> The ABI `compatible` version is bumped to "kho-v2" to reflect the
> structural changes in the preserved memory map and sub-FDT property
> names. This includes renaming "fdt" to "preserved-data" to better
> reflect that preserved state may use formats other than FDT.
>
> Signed-off-by: Jason Miu <[email protected]>
> ---
>  Documentation/core-api/kho/abi.rst     |   6 +
>  Documentation/core-api/kho/index.rst   |  12 +
>  include/linux/kho/abi/kexec_handover.h | 144 +++++-
>  include/linux/kho_radix_tree.h         |  70 +++
>  kernel/liveupdate/kexec_handover.c     | 651 +++++++++++++------------
>  5 files changed, 561 insertions(+), 322 deletions(-)
>  create mode 100644 include/linux/kho_radix_tree.h

Reviewed-by: Pasha Tatashin <[email protected]>

Thanks,
Pasha

Reply via email to