]> xenbits.xensource.com Git - xen.git/commit
x86/spec-ctrl: Fix default calculation of opt_srb_lock
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 4 Jan 2022 14:11:55 +0000 (14:11 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 5 Jan 2022 09:44:26 +0000 (09:44 +0000)
commit31f3bc97f4508687215e459a5e35676eecf1772b
tree7d39fa666d8be342c77d757c0111e213877611ad
parent06cc1f886f323394004190f931266ab328ec8773
x86/spec-ctrl: Fix default calculation of opt_srb_lock

Since this logic was introduced, opt_tsx has become more complicated and
shouldn't be compared to 0 directly.  While there are no buggy logic paths,
the correct expression is !(opt_tsx & 1) but the rtm_disabled boolean is
easier and clearer to use.

Fixes: 8fe24090d940 ("x86/cpuid: Rework HLE and RTM handling")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/spec_ctrl.c