On 04/10/2020 08:38, Jan Beulich wrote: > On 02.10.2020 23:36, Andrew Cooper wrote: >> c/s 4304ff420e5 "x86/S3: Drop {save,restore}_rest_processor_state() >> completely" moved CR4 restoration up into C, to account for the fact that MCE >> was explicitly handled later. >> >> However, time_resume() ends up making an EFI Runtime Service call, and EFI >> explodes without OSFXSR, presumably when trying to spill %xmm registers onto >> the stack. >> >> Given this codepath, and the potential for other issues of a similar kind >> (TLB >> flushing vs INVPCID, HVM logic vs VMXE, etc), restore CR4 in asm before >> entering C. >> >> Ignore the previous MCE special case, because its not actually necessary. >> The >> handler is already suitably configured from before suspend. > Are you suggesting we could drop the call to mcheck_init() altogether?
Not completely. It reconfigures some of the MCE bank controls, which probably won't survive S3, but the #MC handler itself is fully intact once the IDT is re-established. It probably wants splitting in two, but I think some part of it needs to remain. > >> Fixes: 4304ff420e5 ("x86/S3: Drop {save,restore}_rest_processor_state() >> completely") >> Reported-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> >> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com> Thanks, ~Andrew