[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.12] x86/spec-ctrl: Mitigate TAA after S3 resume



commit ea20eee97e9e0861127a8070cc7b9ae3557b09fb
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu May 20 01:21:39 2021 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jun 8 19:14:03 2021 +0100

    x86/spec-ctrl: Mitigate TAA after S3 resume
    
    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@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    (cherry picked from commit 8cf276cb2e0b99b96333865873f56b0b31555ff1)
---
 xen/arch/x86/acpi/power.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
index a07aa3b9ed..660363a3df 100644
--- a/xen/arch/x86/acpi/power.c
+++ b/xen/arch/x86/acpi/power.c
@@ -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)\n");
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.