2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
20 #ifndef __VMX_HANDLER_H__
21 #define __VMX_HANDLER_H__
25 #include <palacios/vm_guest.h>
27 /******************************************/
28 /* VMX Intercept Exit Codes */
29 /******************************************/
30 #define VMEXIT_INFO_EXCEPTION_OR_NMI 0
31 #define VMEXIT_EXTERNAL_INTR 1
32 #define VMEXIT_TRIPLE_FAULT 2
33 #define VMEXIT_INIT_SIGNAL 3
34 #define VMEXIT_STARTUP_IPI 4
35 #define VMEXIT_IO_SMI 5
36 #define VMEXIT_OTHER_SMI 6
37 #define VMEXIT_INTR_WINDOW 7
38 #define VMEXIT_NMI_WINDOW 8
39 #define VMEXIT_TASK_SWITCH 9
40 #define VMEXIT_CPUID 10
42 #define VMEXIT_INVD 13
43 #define VMEXIT_INVLPG 14
44 #define VMEXIT_RDPMC 15
45 #define VMEXIT_RDTSC 16
47 #define VMEXIT_VMCALL 18
48 #define VMEXIT_VMCLEAR 19
49 #define VMEXIT_VMLAUNCH 20
50 #define VMEXIT_VMPTRLD 21
51 #define VMEXIT_VMPTRST 22
52 #define VMEXIT_VMREAD 23
53 #define VMEXIT_VMRESUME 24
54 #define VMEXIT_VMWRITE 25
55 #define VMEXIT_VMXOFF 26
56 #define VMEXIT_VMXON 27
57 #define VMEXIT_CR_REG_ACCESSES 28
58 #define VMEXIT_MOV_DR 29
59 #define VMEXIT_IO_INSTR 30
60 #define VMEXIT_RDMSR 31
61 #define VMEXIT_WRMSR 32
62 #define VMEXIT_ENTRY_FAIL_INVALID_GUEST_STATE 33
63 #define VMEXIT_ENTRY_FAIL_MSR_LOAD 34
64 #define VMEXIT_MWAIT 36
65 #define VMEXIT_MONITOR 39
66 #define VMEXIT_PAUSE 40
67 #define VMEXIT_ENTRY_FAILURE_MACHINE_CHECK 41
68 #define VMEXIT_TPR_BELOW_THRESHOLD 43
70 int v3_handle_vmx_exit(struct guest_info * info);