]> xenbits.xensource.com Git - xen.git/commit
nested vmx: Validate host VMX MSRs before accessing them
authorEuan Harris <euan.harris@citrix.com>
Thu, 9 Jun 2016 10:14:10 +0000 (10:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 Jun 2016 11:44:32 +0000 (12:44 +0100)
commit5e02972646132ad98c365ebfcfcb43b40a0dde36
tree6ebca7a55a12f1985d7e677b7ba46f3002fb55ba
parent7c9cd39b3aee0376b163b29837b9bd724089085b
nested vmx: Validate host VMX MSRs before accessing them

Some VMX MSRs may not exist on certain processor models, or may
be disabled because of configuration settings.   It is only safe to
access these MSRs if configuration flags in other MSRs are set.  These
prerequisites are listed in the Intel 64 and IA-32 Architectures
Software Developer’s Manual, Vol 3, Appendix A.

nvmx_msr_read_intercept() does not check the prerequisites before
accessing MSR_IA32_VMX_PROCBASED_CTLS2, MSR_IA32_VMX_EPT_VPID_CAP,
MSR_IA32_VMX_VMFUNC on the host.   Accessing these MSRs from a nested
VMX guest running on a host which does not support them will cause
Xen to crash with a GPF.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vmx/vvmx.c