Re: [PATCH v8 02/18] liveupdate: luo_core: integrate with KHO
From: Mike Rapoport <rppt@kernel.org>
Date: 2025-11-25 18:54:03
Also in:
linux-doc, linux-fsdevel, linux-mm, lkml
From: Mike Rapoport <rppt@kernel.org>
Date: 2025-11-25 18:54:03
Also in:
linux-doc, linux-fsdevel, linux-mm, lkml
On Tue, Nov 25, 2025 at 11:58:32AM -0500, Pasha Tatashin wrote:
Integrate the LUO with the KHO framework to enable passing LUO state across a kexec reboot. This patch implements the lifecycle integration with KHO: 1. Incoming State: During early boot (`early_initcall`), LUO checks if KHO is active. If so, it retrieves the "LUO" subtree, verifies the "luo-v1" compatibility string, and reads the `liveupdate-number` to track the update count. 2. Outgoing State: During late initialization (`late_initcall`), LUO allocates a new FDT for the next kernel, populates it with the basic header (compatible string and incremented update number), and registers it with KHO (`kho_add_subtree`). 3. Finalization: The `liveupdate_reboot()` notifier is updated to invoke `kho_finalize()`. This ensures that all memory segments marked for preservation are properly serialized before the kexec jump. Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
--- include/linux/kho/abi/luo.h | 58 ++++++++++++ kernel/liveupdate/luo_core.c | 154 ++++++++++++++++++++++++++++++- kernel/liveupdate/luo_internal.h | 22 +++++ 3 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 include/linux/kho/abi/luo.h create mode 100644 kernel/liveupdate/luo_internal.h
-- Sincerely yours, Mike.