Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
[linux-3.10.git] / arch / x86 / include / uapi / asm / vmx.h
1 /*
2  * vmx.h: VMX Architecture related definitions
3  * Copyright (c) 2004, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16  * Place - Suite 330, Boston, MA 02111-1307 USA.
17  *
18  * A few random additions are:
19  * Copyright (C) 2006 Qumranet
20  *    Avi Kivity <avi@qumranet.com>
21  *    Yaniv Kamay <yaniv@qumranet.com>
22  *
23  */
24 #ifndef _UAPIVMX_H
25 #define _UAPIVMX_H
26
27
28 #define VMX_EXIT_REASONS_FAILED_VMENTRY         0x80000000
29
30 #define EXIT_REASON_EXCEPTION_NMI       0
31 #define EXIT_REASON_EXTERNAL_INTERRUPT  1
32 #define EXIT_REASON_TRIPLE_FAULT        2
33
34 #define EXIT_REASON_PENDING_INTERRUPT   7
35 #define EXIT_REASON_NMI_WINDOW          8
36 #define EXIT_REASON_TASK_SWITCH         9
37 #define EXIT_REASON_CPUID               10
38 #define EXIT_REASON_HLT                 12
39 #define EXIT_REASON_INVD                13
40 #define EXIT_REASON_INVLPG              14
41 #define EXIT_REASON_RDPMC               15
42 #define EXIT_REASON_RDTSC               16
43 #define EXIT_REASON_VMCALL              18
44 #define EXIT_REASON_VMCLEAR             19
45 #define EXIT_REASON_VMLAUNCH            20
46 #define EXIT_REASON_VMPTRLD             21
47 #define EXIT_REASON_VMPTRST             22
48 #define EXIT_REASON_VMREAD              23
49 #define EXIT_REASON_VMRESUME            24
50 #define EXIT_REASON_VMWRITE             25
51 #define EXIT_REASON_VMOFF               26
52 #define EXIT_REASON_VMON                27
53 #define EXIT_REASON_CR_ACCESS           28
54 #define EXIT_REASON_DR_ACCESS           29
55 #define EXIT_REASON_IO_INSTRUCTION      30
56 #define EXIT_REASON_MSR_READ            31
57 #define EXIT_REASON_MSR_WRITE           32
58 #define EXIT_REASON_INVALID_STATE       33
59 #define EXIT_REASON_MWAIT_INSTRUCTION   36
60 #define EXIT_REASON_MONITOR_INSTRUCTION 39
61 #define EXIT_REASON_PAUSE_INSTRUCTION   40
62 #define EXIT_REASON_MCE_DURING_VMENTRY  41
63 #define EXIT_REASON_TPR_BELOW_THRESHOLD 43
64 #define EXIT_REASON_APIC_ACCESS         44
65 #define EXIT_REASON_EPT_VIOLATION       48
66 #define EXIT_REASON_EPT_MISCONFIG       49
67 #define EXIT_REASON_WBINVD              54
68 #define EXIT_REASON_XSETBV              55
69 #define EXIT_REASON_INVPCID             58
70
71 #define VMX_EXIT_REASONS \
72         { EXIT_REASON_EXCEPTION_NMI,         "EXCEPTION_NMI" }, \
73         { EXIT_REASON_EXTERNAL_INTERRUPT,    "EXTERNAL_INTERRUPT" }, \
74         { EXIT_REASON_TRIPLE_FAULT,          "TRIPLE_FAULT" }, \
75         { EXIT_REASON_PENDING_INTERRUPT,     "PENDING_INTERRUPT" }, \
76         { EXIT_REASON_NMI_WINDOW,            "NMI_WINDOW" }, \
77         { EXIT_REASON_TASK_SWITCH,           "TASK_SWITCH" }, \
78         { EXIT_REASON_CPUID,                 "CPUID" }, \
79         { EXIT_REASON_HLT,                   "HLT" }, \
80         { EXIT_REASON_INVLPG,                "INVLPG" }, \
81         { EXIT_REASON_RDPMC,                 "RDPMC" }, \
82         { EXIT_REASON_RDTSC,                 "RDTSC" }, \
83         { EXIT_REASON_VMCALL,                "VMCALL" }, \
84         { EXIT_REASON_VMCLEAR,               "VMCLEAR" }, \
85         { EXIT_REASON_VMLAUNCH,              "VMLAUNCH" }, \
86         { EXIT_REASON_VMPTRLD,               "VMPTRLD" }, \
87         { EXIT_REASON_VMPTRST,               "VMPTRST" }, \
88         { EXIT_REASON_VMREAD,                "VMREAD" }, \
89         { EXIT_REASON_VMRESUME,              "VMRESUME" }, \
90         { EXIT_REASON_VMWRITE,               "VMWRITE" }, \
91         { EXIT_REASON_VMOFF,                 "VMOFF" }, \
92         { EXIT_REASON_VMON,                  "VMON" }, \
93         { EXIT_REASON_CR_ACCESS,             "CR_ACCESS" }, \
94         { EXIT_REASON_DR_ACCESS,             "DR_ACCESS" }, \
95         { EXIT_REASON_IO_INSTRUCTION,        "IO_INSTRUCTION" }, \
96         { EXIT_REASON_MSR_READ,              "MSR_READ" }, \
97         { EXIT_REASON_MSR_WRITE,             "MSR_WRITE" }, \
98         { EXIT_REASON_MWAIT_INSTRUCTION,     "MWAIT_INSTRUCTION" }, \
99         { EXIT_REASON_MONITOR_INSTRUCTION,   "MONITOR_INSTRUCTION" }, \
100         { EXIT_REASON_PAUSE_INSTRUCTION,     "PAUSE_INSTRUCTION" }, \
101         { EXIT_REASON_MCE_DURING_VMENTRY,    "MCE_DURING_VMENTRY" }, \
102         { EXIT_REASON_TPR_BELOW_THRESHOLD,   "TPR_BELOW_THRESHOLD" }, \
103         { EXIT_REASON_APIC_ACCESS,           "APIC_ACCESS" }, \
104         { EXIT_REASON_EPT_VIOLATION,         "EPT_VIOLATION" }, \
105         { EXIT_REASON_EPT_MISCONFIG,         "EPT_MISCONFIG" }, \
106         { EXIT_REASON_WBINVD,                "WBINVD" }
107
108
109 #endif /* _UAPIVMX_H */