[PATCH v1 1/3] liveupdate: skip serialization for context-preserving kexec
Pasha Tatashin
pasha.tatashin at soleen.com
Wed May 6 09:06:33 PDT 2026
On 05-06 17:33, Pratyush Yadav wrote:
> On Wed, May 06 2026, Pasha Tatashin wrote:
>
> > On 05-06 10:31, Pratyush Yadav wrote:
> >> Hi Pasha,
> >>
> >> On Wed, May 06 2026, Pasha Tatashin wrote:
> >>
> >> > A preserve_context kexec returns to the current kernel, which
> >> > is unrelated to live update where the state is passed to the next
> >> > kernel. Skip liveupdate_reboot() in this case to avoid serialization
> >> > and prevent sessions from being left in a frozen state upon return.
> >>
> >> Should we also stop KHO? Now it is stateless and always finalized. I am
> >
> > No. KHO preserves kernel internal memory; for context-preserved
> > kexec, the 2nd kernel and the 1st kernel do not have overlapping
> > memory. So, whatever the 1st kernel maintains in KHO is an internal
> > detail of the 1st kernel. Once we return from the 2nd kernel to the 1st
> > kernel, all KHO memory is going to stay as-is, and the 1st kernel can
> > even perform a regular kexec or live update later.
>
> My point is that we keep KHO data in the 1st kernel but do not pass it
> to the 2nd kernel via setup_data or the devicetree because it should not
> use that memory anyway. So essentially we add a check in
> kho_fill_kimage() and return early if preserve_context is set.
This is a good point, I think we should do that to prevent passing via
setup_data on preserve_context kexec.
>
> I don't think it makes much difference in practice so no strong
> opinions. Fine either way.
>
> [...]
>
> --
> Regards,
> Pratyush Yadav
More information about the kexec
mailing list