From 7c1779384a2b2479722e90778721c40811e1b7a7 Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Wed, 25 May 2011 23:12:04 +0300 Subject: KVM: nVMX: vmcs12 checks on nested entry This patch adds a bunch of tests of the validity of the vmcs12 fields, according to what the VMX spec and our implementation allows. If fields we cannot (or don't want to) honor are discovered, an entry failure is emulated. According to the spec, there are two types of entry failures: If the problem was in vmcs12's host state or control fields, the VMLAUNCH instruction simply fails. But a problem is found in the guest state, the behavior is more similar to that of an exit. Signed-off-by: Nadav Har'El Signed-off-by: Marcelo Tosatti --- arch/x86/include/asm/vmx.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/x86/include/asm/vmx.h') diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index b747773cf83b..2caf290e9895 100644 --- a/arch/x86/include/asm/vmx.h +++ b/arch/x86/include/asm/vmx.h @@ -430,6 +430,14 @@ struct vmx_msr_entry { u64 value; } __aligned(16); +/* + * Exit Qualifications for entry failure during or after loading guest state + */ +#define ENTRY_FAIL_DEFAULT 0 +#define ENTRY_FAIL_PDPTE 2 +#define ENTRY_FAIL_NMI 3 +#define ENTRY_FAIL_VMCS_LINK_PTR 4 + /* * VM-instruction error numbers */ -- cgit v1.2.1