x86/spec-ctrl: Fix default calculation of opt_srb_lock
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Jan 2022 13:15:14 +0000 (14:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 6 Jan 2022 13:15:14 +0000 (14:15 +0100)
commit243026a2c5ad64c05281dc8ed2f1f57c0ee5988c
tree6789be58d0e8fad97eae96683eb5f63c0b8fc391
parent1172a4359e976cd28de488412ba656ec116ab7eb
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>
master commit: 31f3bc97f4508687215e459a5e35676eecf1772b
master date: 2022-01-05 09:44:26 +0000
xen/arch/x86/spec_ctrl.c