KVM: nVMX: Improve nested msr switch checking
PATCH v3 2/3 KVM: nVMX: Improve nested msr switch checking
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 <[email protected]>
--- arch/x86/include/uapi/asm/msr-index.h | 3 + arch/x86/kvm/vmx.c | 121 ++++++++++++++++++++++++++++++---- 2 files changed, 110 insertions(+), 14 deletions(-)
arch/x86/include/uapi/asm/msr-index.h +3 -0
@@ -316,6 +316,9 @@#define MSR_IA32_UCODE_WRITE 0x00000079#define MSR_IA32_UCODE_REV 0x0000008b +#define MSR_IA32_SMM_MONITOR_CTL 0x0000009b +#define MSR_IA32_SMBASE 0x0000009e +#define MSR_IA32_PERF_STATUS 0x00000198#define MSR_IA32_PERF_CTL 0x00000199#define MSR_AMD_PSTATE_DEF_BASE 0xc0010064
arch/x86/kvm/vmx.c +107 -14
154 lines not on this page · raw message
Signature · 1 line
2.0.4