]> xenbits.xensource.com Git - xen.git/commitdiff
x86/spec-ctrl: Mitigate TAA after S3 resume
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 20 May 2021 00:21:39 +0000 (01:21 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Jun 2021 18:16:38 +0000 (19:16 +0100)
The user chosen setting for MSR_TSX_CTRL needs restoring after S3.

All APs get the correct setting via start_secondary(), but the BSP was missed
out.

This is XSA-377 / CVE-2021-28690.

Fixes: 8c4330818f6 ("x86/spec-ctrl: Mitigate the TSX Asynchronous Abort sidechannel")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 8cf276cb2e0b99b96333865873f56b0b31555ff1)

xen/arch/x86/acpi/power.c

index 30e1bd5cd3da441c2a921608b2388400aece8721..451cba622c165c00155e27a1ef6a9beb7c27000b 100644 (file)
@@ -259,6 +259,8 @@ static int enter_state(u32 state)
 
     microcode_resume_cpu(0);
 
+    tsx_init(); /* Needs microcode.  May change HLE/RTM feature bits. */
+
     if ( !recheck_cpu_features(0) )
         panic("Missing previously available feature(s).");