KVM: x86: handle missing MPX in nested virtualization
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 5 Mar 2014 22:19:52 +0000 (23:19 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 Mar 2014 11:21:39 +0000 (12:21 +0100)
When doing nested virtualization, we may be able to read BNDCFGS but
still not be allowed to write to GUEST_BNDCFGS in the VMCS.  Guard
writes to the field with vmx_mpx_supported(), and similarly hide the
MSR from userspace if the processor does not support the field.

We could work around this with the generic MSR save/load machinery,
but there is only a limited number of MSR save/load slots and it is
not really worthwhile to waste one for a scenario that should not
happen except in the nested virtualization case.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c

Simple merge
Simple merge
Simple merge
Simple merge