]> xenbits.xensource.com Git - xen.git/commitdiff
x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling"
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Jul 2021 06:26:33 +0000 (08:26 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 16 Jul 2021 06:26:33 +0000 (08:26 +0200)
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@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/spec_ctrl.c

index 33343062a7b62a6d666dcc74dc478d89c101713e..1cfd02d7d7cff843cb863d0c9973a4519509d6cb 100644 (file)
@@ -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();
     }