]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: vmx: Do not disable intercepts for BNDCFGS
authorJim Mattson <jmattson@google.com>
Tue, 23 May 2017 18:52:52 +0000 (11:52 -0700)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 7 Jun 2017 14:28:15 +0000 (16:28 +0200)
commitcaf7746a9ac3012a3df50c805a97cb12283cdca1
treeabf9f0e5c51970832f3175faac041796a27479d7
parent990227a62f974c637f721e4cd4a7bdcaaa8e57ab
kvm: vmx: Do not disable intercepts for BNDCFGS

The MSR permission bitmaps are shared by all VMs. However, some VMs
may not be configured to support MPX, even when the host does. If the
host supports VMX and the guest does not, we should intercept accesses
to the BNDCFGS MSR, so that we can synthesize a #GP
fault. Furthermore, if the host does not support MPX and the
"ignore_msrs" kvm kernel parameter is set, then we should intercept
accesses to the BNDCFGS MSR, so that we can skip over the rdmsr/wrmsr
without raising a #GP fault.

Fixes: 559bcb8e7c107e1a ("KVM: x86: Intel MPX vmx and msr handle")
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c