x86/spec-ctrl: Don't use spec_ctrl_{enter,exit}_idle() for S3
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 28 Jan 2022 12:03:42 +0000 (12:03 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Feb 2022 13:20:44 +0000 (13:20 +0000)
commit71fac402e05ade7b0af2c34f77517449f6f7e2c1
tree67ca96ee1f9530645a958b728d61c24cc215ae17
parent5d9eff3a312763d889cfbf3c8468b6dfb3ab490c
x86/spec-ctrl: Don't use spec_ctrl_{enter,exit}_idle() for S3

'idle' here refers to hlt/mwait.  The S3 path isn't an idle path - it is a
platform reset.

We need to load default_xen_spec_ctrl unilaterally on the way back up.
Currently it happens as a side effect of X86_FEATURE_SC_MSR_IDLE or the next
return-to-guest, but that's fragile behaviour.

Conversely, there is no need to clear IBRS and flush the store buffers on the
way down; we're microseconds away from cutting power.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/power.c