[PATCH v2 12/13] kho: Allow memory preservation state updates after finalization

Pratyush Yadav pratyush at kernel.org
Fri Nov 14 11:35:28 PST 2025


On Fri, Nov 14 2025, Pasha Tatashin wrote:

> Currently, kho_preserve_* and kho_unpreserve_* return -EBUSY if
> KHO is finalized. This enforces a rigid "freeze" on the KHO memory
> state.
>
> With the introduction of re-entrant finalization, this restriction is
> no longer necessary. Users should be allowed to modify the preservation
> set (e.g., adding new pages or freeing old ones) even after an initial
> finalization.
>
> The intended workflow for updates is now:
> 1. Modify state (preserve/unpreserve).
> 2. Call kho_finalize() again to refresh the serialized metadata.
>
> Remove the kho_out.finalized checks to enable this dynamic behavior.
>
> This also allows to convert kho_unpreserve_* functions to void, as they
> do not return any error anymore.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin at soleen.com>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt at kernel.org>

Reviewed-by: Pratyush Yadav <pratyush at kernel.org>

[...]

-- 
Regards,
Pratyush Yadav



More information about the kexec mailing list