Re: [PATCH v10 07/15] x86/kexec: Disable LASS during relocate kernel

Sohil Mehta
2025-10-07T22:33:27Z

On 10/7/2025 10:43 AM, Edgecombe, Rick P wrote:
> On Mon, 2025-10-06 at 23:51 -0700, Sohil Mehta wrote:
>> Relocate kernel uses identity mapping to copy the new kernel which
>> leads to an LASS violation. To avoid issues, disable LASS after the
>> original CR4 value has been saved but before jumping to the identity
>> mapped page.
>
> It could help to expand on this a bit. Something like... We need to disable LASS
> before we jump to the identity map because otherwise it will immediately die
> trying to execute a low address. But if the kexec flavor gets to virtual_mapped,
> we want LASS restored, so we need to disable LASS after CR4 is saved. We also
> can't disable it where CET get's disabled because that is too late. So disable
> it along with PGE.
>

Sure, will add the detailed reasoning.