KVM: nVMX: Improve nested msr switch checking
authorEugene Korenevsky <ekorenevsky@gmail.com>
Thu, 11 Dec 2014 05:53:27 +0000 (08:53 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Jan 2015 21:45:15 +0000 (22:45 +0100)
This patch improve checks required by Intel Software Developer Manual.
 - SMM MSRs are not allowed.
 - microcode MSRs are not allowed.
 - check x2apic MSRs only when LAPIC is in x2apic mode.
 - MSR switch areas must be aligned to 16 bytes.
 - address of first and last byte in MSR switch areas should not set any bits
   beyond the processor's physical-address width.

Also it adds warning messages on failures during MSR switch. These messages
are useful for people who debug their VMMs in nVMX.

Signed-off-by: Eugene Korenevsky <ekorenevsky@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/uapi/asm/msr-index.h
arch/x86/kvm/vmx.c

Simple merge
Simple merge