Re: [PATCH v6 4/8] kho: Add kho_disable()

From: Mike Rapoport

Date: Thu Nov 05 2026 - 08:16:59 EST


Hi George,

On Fri, Oct 30, 2026 at 02:29:51AM +0900, George Guo wrote:
> From: George Guo <guodongtai@xxxxxxxxxx>
>
> On LoongArch, KHO state is passed to the next kernel only through an EFI
> configuration table. Only the EFI stub installs this table, during a cold
> boot.
>
> A kernel entered through kexec does not run the EFI stub, so it cannot
> create the table if the previous kernel did not provide one. Without
> the table, it cannot pass KHO state to the next kernel on a subsequent
> kexec.

The idea behind KHO and liveupdate is that the system uses kexec + KHO for
reboots after the cold boot unless a new cold reboot is a must.

Doing one yes, one no, breaks that assumption.

> Add kho_disable() so architecture code can turn KHO off when the EFI
> configuration table is missing.

I don't like a global kho_disable() API. It's ambiguous and fragile.

> Signed-off-by: George Guo <guodongtai@xxxxxxxxxx>
> ---
> include/linux/kexec_handover.h | 3 +++
> kernel/liveupdate/kexec_handover.c | 9 +++++++++
> 2 files changed, 12 insertions(+)

--
Sincerely yours,
Mike.