Move ros/vmx.h to an arch-specific location (XCC)
[akaros.git] / user / vmm / vmx.h
1 // TODO: put this some common place for user and kernel mode. Once
2 // we know we need to. Not sure we want to expose this outside
3 // vmrunkernel anyway. Users may claim they want to write a vmm, but ...
4 #define VMX_EXIT_REASONS_FAILED_VMENTRY         0x80000000
5
6 #define EXIT_REASON_EXCEPTION_NMI       0
7 #define EXIT_REASON_EXTERNAL_INTERRUPT  1
8 #define EXIT_REASON_TRIPLE_FAULT        2
9
10 #define EXIT_REASON_PENDING_INTERRUPT   7
11 #define EXIT_REASON_INTERRUPT_WINDOW    7
12 #define EXIT_REASON_NMI_WINDOW          8
13 #define EXIT_REASON_TASK_SWITCH         9
14 #define EXIT_REASON_CPUID               10
15 #define EXIT_REASON_HLT                 12
16 #define EXIT_REASON_INVD                13
17 #define EXIT_REASON_INVLPG              14
18 #define EXIT_REASON_RDPMC               15
19 #define EXIT_REASON_RDTSC               16
20 #define EXIT_REASON_VMCALL              18
21 #define EXIT_REASON_VMCLEAR             19
22 #define EXIT_REASON_VMLAUNCH            20
23 #define EXIT_REASON_VMPTRLD             21
24 #define EXIT_REASON_VMPTRST             22
25 #define EXIT_REASON_VMREAD              23
26 #define EXIT_REASON_VMRESUME            24
27 #define EXIT_REASON_VMWRITE             25
28 #define EXIT_REASON_VMOFF               26
29 #define EXIT_REASON_VMON                27
30 #define EXIT_REASON_CR_ACCESS           28
31 #define EXIT_REASON_DR_ACCESS           29
32 #define EXIT_REASON_IO_INSTRUCTION      30
33 #define EXIT_REASON_MSR_READ            31
34 #define EXIT_REASON_MSR_WRITE           32
35 #define EXIT_REASON_INVALID_STATE       33
36 #define EXIT_REASON_MWAIT_INSTRUCTION   36
37 #define EXIT_REASON_MONITOR_INSTRUCTION 39
38 #define EXIT_REASON_PAUSE_INSTRUCTION   40
39 #define EXIT_REASON_MCE_DURING_VMENTRY  41
40 #define EXIT_REASON_TPR_BELOW_THRESHOLD 43
41 #define EXIT_REASON_APIC_ACCESS         44
42 #define EXIT_REASON_EPT_VIOLATION       48
43 #define EXIT_REASON_EPT_MISCONFIG       49
44 #define EXIT_REASON_WBINVD              54
45 #define EXIT_REASON_XSETBV              55
46 #define EXIT_REASON_INVPCID             58