aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorNadav Har'El <nyh@il.ibm.com>2011-05-25 16:06:28 -0400
committerAvi Kivity <avi@redhat.com>2011-07-12 04:45:12 -0400
commit0140caea3b9972f826416a796271f17b42cbe827 (patch)
treec3a37c37274622361cf6a8974fdc17acc2c02a72 /arch/x86/include
parent22bd035868b06a614debf7352c09fb3efdc7c269 (diff)
KVM: nVMX: Success/failure of VMX instructions.
VMX instructions specify success or failure by setting certain RFLAGS bits. This patch contains common functions to do this, and they will be used in the following patches which emulate the various VMX instructions. Signed-off-by: Nadav Har'El <nyh@il.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/vmx.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
index 84471b810460..37690bd580c8 100644
--- a/arch/x86/include/asm/vmx.h
+++ b/arch/x86/include/asm/vmx.h
@@ -426,4 +426,35 @@ struct vmx_msr_entry {
426 u64 value; 426 u64 value;
427} __aligned(16); 427} __aligned(16);
428 428
429/*
430 * VM-instruction error numbers
431 */
432enum vm_instruction_error_number {
433 VMXERR_VMCALL_IN_VMX_ROOT_OPERATION = 1,
434 VMXERR_VMCLEAR_INVALID_ADDRESS = 2,
435 VMXERR_VMCLEAR_VMXON_POINTER = 3,
436 VMXERR_VMLAUNCH_NONCLEAR_VMCS = 4,
437 VMXERR_VMRESUME_NONLAUNCHED_VMCS = 5,
438 VMXERR_VMRESUME_AFTER_VMXOFF = 6,
439 VMXERR_ENTRY_INVALID_CONTROL_FIELD = 7,
440 VMXERR_ENTRY_INVALID_HOST_STATE_FIELD = 8,
441 VMXERR_VMPTRLD_INVALID_ADDRESS = 9,
442 VMXERR_VMPTRLD_VMXON_POINTER = 10,
443 VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID = 11,
444 VMXERR_UNSUPPORTED_VMCS_COMPONENT = 12,
445 VMXERR_VMWRITE_READ_ONLY_VMCS_COMPONENT = 13,
446 VMXERR_VMXON_IN_VMX_ROOT_OPERATION = 15,
447 VMXERR_ENTRY_INVALID_EXECUTIVE_VMCS_POINTER = 16,
448 VMXERR_ENTRY_NONLAUNCHED_EXECUTIVE_VMCS = 17,
449 VMXERR_ENTRY_EXECUTIVE_VMCS_POINTER_NOT_VMXON_POINTER = 18,
450 VMXERR_VMCALL_NONCLEAR_VMCS = 19,
451 VMXERR_VMCALL_INVALID_VM_EXIT_CONTROL_FIELDS = 20,
452 VMXERR_VMCALL_INCORRECT_MSEG_REVISION_ID = 22,
453 VMXERR_VMXOFF_UNDER_DUAL_MONITOR_TREATMENT_OF_SMIS_AND_SMM = 23,
454 VMXERR_VMCALL_INVALID_SMM_MONITOR_FEATURES = 24,
455 VMXERR_ENTRY_INVALID_VM_EXECUTION_CONTROL_FIELDS_IN_EXECUTIVE_VMCS = 25,
456 VMXERR_ENTRY_EVENTS_BLOCKED_BY_MOV_SS = 26,
457 VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID = 28,
458};
459
429#endif 460#endif