OSDN Git Service

KVM: vmx: use MSR_IA32_TSX_CTRL to hard-disable TSX on guest that lack it
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Nov 2019 17:23:01 +0000 (12:23 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Nov 2019 09:01:02 +0000 (10:01 +0100)
commitb07a5c53d42a8c87b208614129e947dd2338ff9c
tree55af2acf7fa441a712ec07162ef90661ebbc59a8
parentc11f83e0626bdc2b6c550fc8b9b6eeefbd8cefaa
KVM: vmx: use MSR_IA32_TSX_CTRL to hard-disable TSX on guest that lack it

If X86_FEATURE_RTM is disabled, the guest should not be able to access
MSR_IA32_TSX_CTRL.  We can therefore use it in KVM to force all
transactions from the guest to abort.

Tested-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c