Re: [PATCH v1 1/1] x86/fred: Fix system hang during S4 resume with FRED enabled
From: Ingo Molnar
Date: Tue Apr 01 2025 - 04:24:37 EST
* H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> Just to make it clear: the patch is correct, the shortcoming is in
> the description.
>
> I would say that Xin's description, although perhaps excessively
> brief, is correct from the *hardware* point of view, whereas Rafael
> adds the much needed *software* perspective.
This part of the -v1 patch was a bit misleading to me:
>> Due to changes in the kernel text and data mappings, the FRED MSRs
>> must be reinitialized.
... as it suggests that the FRED MSRs will change from before the
suspend - while they don't.
What this sentence meant is that FRED MSRs set up by the intermediate
*kexec kernel* are incorrect and must be reinitialized again to
reconstruct the pre-hibernation state. Ie. there's 3 FRED setup states:
pre-S4, kexec and post-S4, where pre-S4 == post-S4. Right?
I think the description and comments in the -v2 patch are better in
this regard.
Thanks,
Ingo