Re: [PATCH v5 02/22] liveupdate: luo_core: integrate with KHO
From: Mike Rapoport <rppt@kernel.org>
Date: 2025-11-11 20:26:15
Also in:
linux-doc, linux-fsdevel, linux-mm, lkml
On Fri, Nov 07, 2025 at 04:03:00PM -0500, Pasha Tatashin wrote:
Integrate the LUO with the KHO framework to enable passing LUO state
across a kexec reboot.
When LUO is transitioned to a "prepared" state, it tells KHO to
finalize, so all memory segments that were added to KHO preservation
list are getting preserved. After "Prepared" state no new segments
can be preserved. If LUO is canceled, it also tells KHO to cancel the
serialization, and therefore, later LUO can go back into the prepared
state.
This patch introduces the following changes:
- During the KHO finalization phase allocate FDT blob.
- Populate this FDT with a LUO compatibility string ("luo-v1").
LUO now depends on `CONFIG_KEXEC_HANDOVER`. The core state transition
logic (`luo_do_*_calls`) remains unimplemented in this patch.
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>...
quoted hunk ↗ jump to hunk
diff --git a/mm/mm_init.c b/mm/mm_init.c index c6812b4dbb2e..20c850a52167 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c@@ -21,6 +21,7 @@ #include <linux/buffer_head.h> #include <linux/kmemleak.h> #include <linux/kfence.h> +#include <linux/liveupdate.h> #include <linux/page_ext.h> #include <linux/pti.h> #include <linux/pgtable.h>@@ -2703,6 +2704,9 @@ void __init mm_core_init(void) */ kho_memory_init(); + /* Live Update should follow right after KHO is initialized */ + liveupdate_init(); +
Why do you think it should be immediately after kho_memory_init()? Any reason this can't be called from start_kernel() or even later as an early_initcall() or core_initall()?
memblock_free_all(); mem_init(); kmem_cache_init(); -- 2.51.2.1041.gc1ab5b90ca-goog
-- Sincerely yours, Mike.