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

[xen stable-4.13] x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling"



commit 1f27fc448bc6898ffd7628b42c0847548b54d2fb
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Jul 16 08:26:33 2021 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Jul 16 08:26:33 2021 +0200

    x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling"
    
    The backport dropped the hunk deleting the setup_clear_cpu_cap() for 
HLE/RTM,
    but retained the hunk adding setup_force_cpu_cap().
    
    Calling both force and clear on the same feature elicits an error, and clear
    takes precedence, which breaks the part of the bugfix which makes migration
    from older versions of Xen function safe for VMs using TSX.
    
    Fixes: f17d848c4caa ("x86/cpuid: Rework HLE and RTM handling")
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/spec_ctrl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
index 33343062a7..1cfd02d7d7 100644
--- a/xen/arch/x86/spec_ctrl.c
+++ b/xen/arch/x86/spec_ctrl.c
@@ -1150,9 +1150,6 @@ void __init init_speculation_mitigations(void)
          ((hw_smt_enabled && opt_smt) ||
           !boot_cpu_has(X86_FEATURE_SC_VERW_IDLE)) )
     {
-        setup_clear_cpu_cap(X86_FEATURE_HLE);
-        setup_clear_cpu_cap(X86_FEATURE_RTM);
-
         opt_tsx = 0;
         tsx_init();
     }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13



 


Rackspace

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