KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Nov 2019 17:58:26 +0000 (18:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:43:02 +0000 (08:43 +0100)
commit52c8b0c6e11e139f0e27ea41a7444bfbf17aa2e1
tree9822ce9b14e0b58dc5b7bdf4e237d97c387b2af8
parent0616125c46b9cf8edbc447a43633dad96cfd3060
KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES

commit cbbaa2727aa3ae9e0a844803da7cef7fd3b94f2b upstream.

KVM does not implement MSR_IA32_TSX_CTRL, so it must not be presented
to the guests.  It is also confusing to have !ARCH_CAP_TSX_CTRL_MSR &&
!RTM && ARCH_CAP_TAA_NO: lack of MSR_IA32_TSX_CTRL suggests TSX was not
hidden (it actually was), yet the value says that TSX is not vulnerable
to microarchitectural data sampling.  Fix both.

Cc: stable@vger.kernel.org
Tested-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c