summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/vmx.h
diff options
context:
space:
mode:
authorNadav Har'El <nyh@il.ibm.com>2011-05-25 23:12:04 +0300
committerAvi Kivity <avi@redhat.com>2011-07-12 11:45:16 +0300
commit7c1779384a2b2479722e90778721c40811e1b7a7 (patch)
tree586847b6e8b562a1c8118138533735b7f7104248 /arch/x86/include/asm/vmx.h
parent4704d0befb0721274bda863192c4782febb6b94c (diff)
downloadop-kernel-dev-7c1779384a2b2479722e90778721c40811e1b7a7.zip
op-kernel-dev-7c1779384a2b2479722e90778721c40811e1b7a7.tar.gz
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 <nyh@il.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/vmx.h')
-rw-r--r--arch/x86/include/asm/vmx.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
index b747773..2caf290 100644
--- a/arch/x86/include/asm/vmx.h
+++ b/arch/x86/include/asm/vmx.h
@@ -431,6 +431,14 @@ struct vmx_msr_entry {
} __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
*/
enum vm_instruction_error_number {
OpenPOWER on IntegriCloud