1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2011 Joyent, Inc. All rights reserved.
*/
inline int R_GS = @GS@;
#pragma D binding "1.0" R_GS
inline int R_FS = @FS@;
#pragma D binding "1.0" R_FS
inline int R_ES = @ES@;
#pragma D binding "1.0" R_ES
inline int R_DS = @DS@;
#pragma D binding "1.0" R_DS
inline int R_EDI = @EDI@;
#pragma D binding "1.0" R_EDI
inline int R_ESI = @ESI@;
#pragma D binding "1.0" R_ESI
inline int R_EBP = @EBP@;
#pragma D binding "1.0" R_EBP
inline int R_ESP = @ESP@;
#pragma D binding "1.0" R_ESP
inline int R_EBX = @EBX@;
#pragma D binding "1.0" R_EBX
inline int R_EDX = @EDX@;
#pragma D binding "1.0" R_EDX
inline int R_ECX = @ECX@;
#pragma D binding "1.0" R_ECX
inline int R_EAX = @EAX@;
#pragma D binding "1.0" R_EAX
inline int R_TRAPNO = @TRAPNO@;
#pragma D binding "1.0" R_TRAPNO
inline int R_ERR = @ERR@;
#pragma D binding "1.0" R_ERR
inline int R_EIP = @EIP@;
#pragma D binding "1.0" R_EIP
inline int R_CS = @CS@;
#pragma D binding "1.0" R_CS
inline int R_EFL = @EFL@;
#pragma D binding "1.0" R_EFL
inline int R_UESP = @UESP@;
#pragma D binding "1.0" R_UESP
inline int R_SS = @SS@;
#pragma D binding "1.0" R_SS
inline int R_PC = R_EIP;
#pragma D binding "1.0" R_PC
inline int R_SP = R_UESP;
#pragma D binding "1.0" R_SP
inline int R_PS = R_EFL;
#pragma D binding "1.0" R_PS
inline int R_R0 = R_EAX;
#pragma D binding "1.0" R_R0
inline int R_R1 = R_EBX;
#pragma D binding "1.0" R_R1
inline int R_RSP = @REG_RSP@;
#pragma D binding "1.0" R_RSP
inline int R_RFL = @REG_RFL@;
#pragma D binding "1.0" R_RFL
inline int R_RIP = @REG_RIP@;
#pragma D binding "1.0" R_RIP
inline int R_RAX = @REG_RAX@;
#pragma D binding "1.0" R_RAX
inline int R_RCX = @REG_RCX@;
#pragma D binding "1.0" R_RCX
inline int R_RDX = @REG_RDX@;
#pragma D binding "1.0" R_RDX
inline int R_RBX = @REG_RBX@;
#pragma D binding "1.0" R_RBX
inline int R_RBP = @REG_RBP@;
#pragma D binding "1.0" R_RBP
inline int R_RSI = @REG_RSI@;
#pragma D binding "1.0" R_RSI
inline int R_RDI = @REG_RDI@;
#pragma D binding "1.0" R_RDI
inline int R_R8 = @REG_R8@;
#pragma D binding "1.0" R_R8
inline int R_R9 = @REG_R9@;
#pragma D binding "1.0" R_R9
inline int R_R10 = @REG_R10@;
#pragma D binding "1.0" R_R10
inline int R_R11 = @REG_R11@;
#pragma D binding "1.0" R_R11
inline int R_R12 = @REG_R12@;
#pragma D binding "1.0" R_R12
inline int R_R13 = @REG_R13@;
#pragma D binding "1.0" R_R13
inline int R_R14 = @REG_R14@;
#pragma D binding "1.0" R_R14
inline int R_R15 = @REG_R15@;
#pragma D binding "1.0" R_R15
enum vmregs_vmx {
VMX_VIRTUAL_PROCESSOR_ID = 0x00000000,
VMX_GUEST_ES_SELECTOR = 0x00000800,
VMX_GUEST_CS_SELECTOR = 0x00000802,
VMX_GUEST_SS_SELECTOR = 0x00000804,
VMX_GUEST_DS_SELECTOR = 0x00000806,
VMX_GUEST_FS_SELECTOR = 0x00000808,
VMX_GUEST_GS_SELECTOR = 0x0000080a,
VMX_GUEST_LDTR_SELECTOR = 0x0000080c,
VMX_GUEST_TR_SELECTOR = 0x0000080e,
VMX_HOST_ES_SELECTOR = 0x00000c00,
VMX_HOST_CS_SELECTOR = 0x00000c02,
VMX_HOST_SS_SELECTOR = 0x00000c04,
VMX_HOST_DS_SELECTOR = 0x00000c06,
VMX_HOST_FS_SELECTOR = 0x00000c08,
VMX_HOST_GS_SELECTOR = 0x00000c0a,
VMX_HOST_TR_SELECTOR = 0x00000c0c,
VMX_IO_BITMAP_A = 0x00002000,
VMX_IO_BITMAP_A_HIGH = 0x00002001,
VMX_IO_BITMAP_B = 0x00002002,
VMX_IO_BITMAP_B_HIGH = 0x00002003,
VMX_MSR_BITMAP = 0x00002004,
VMX_MSR_BITMAP_HIGH = 0x00002005,
VMX_VM_EXIT_MSR_STORE_ADDR = 0x00002006,
VMX_VM_EXIT_MSR_STORE_ADDR_HIGH = 0x00002007,
VMX_VM_EXIT_MSR_LOAD_ADDR = 0x00002008,
VMX_VM_EXIT_MSR_LOAD_ADDR_HIGH = 0x00002009,
VMX_VM_ENTRY_MSR_LOAD_ADDR = 0x0000200a,
VMX_VM_ENTRY_MSR_LOAD_ADDR_HIGH = 0x0000200b,
VMX_TSC_OFFSET = 0x00002010,
VMX_TSC_OFFSET_HIGH = 0x00002011,
VMX_VIRTUAL_APIC_PAGE_ADDR = 0x00002012,
VMX_VIRTUAL_APIC_PAGE_ADDR_HIGH = 0x00002013,
VMX_APIC_ACCESS_ADDR = 0x00002014,
VMX_APIC_ACCESS_ADDR_HIGH = 0x00002015,
VMX_EPT_POINTER = 0x0000201a,
VMX_EPT_POINTER_HIGH = 0x0000201b,
VMX_GUEST_PHYSICAL_ADDRESS = 0x00002400,
VMX_GUEST_PHYSICAL_ADDRESS_HIGH = 0x00002401,
VMX_VMCS_LINK_POINTER = 0x00002800,
VMX_VMCS_LINK_POINTER_HIGH = 0x00002801,
VMX_GUEST_IA32_DEBUGCTL = 0x00002802,
VMX_GUEST_IA32_DEBUGCTL_HIGH = 0x00002803,
VMX_GUEST_IA32_PAT = 0x00002804,
VMX_GUEST_IA32_PAT_HIGH = 0x00002805,
VMX_GUEST_PDPTR0 = 0x0000280a,
VMX_GUEST_PDPTR0_HIGH = 0x0000280b,
VMX_GUEST_PDPTR1 = 0x0000280c,
VMX_GUEST_PDPTR1_HIGH = 0x0000280d,
VMX_GUEST_PDPTR2 = 0x0000280e,
VMX_GUEST_PDPTR2_HIGH = 0x0000280f,
VMX_GUEST_PDPTR3 = 0x00002810,
VMX_GUEST_PDPTR3_HIGH = 0x00002811,
VMX_HOST_IA32_PAT = 0x00002c00,
VMX_HOST_IA32_PAT_HIGH = 0x00002c01,
VMX_PIN_BASED_VM_EXEC_CONTROL = 0x00004000,
VMX_CPU_BASED_VM_EXEC_CONTROL = 0x00004002,
VMX_EXCEPTION_BITMAP = 0x00004004,
VMX_PAGE_FAULT_ERROR_CODE_MASK = 0x00004006,
VMX_PAGE_FAULT_ERROR_CODE_MATCH = 0x00004008,
VMX_CR3_TARGET_COUNT = 0x0000400a,
VMX_VM_EXIT_CONTROLS = 0x0000400c,
VMX_VM_EXIT_MSR_STORE_COUNT = 0x0000400e,
VMX_VM_EXIT_MSR_LOAD_COUNT = 0x00004010,
VMX_VM_ENTRY_CONTROLS = 0x00004012,
VMX_VM_ENTRY_MSR_LOAD_COUNT = 0x00004014,
VMX_VM_ENTRY_INTR_INFO_FIELD = 0x00004016,
VMX_VM_ENTRY_EXCEPTION_ERROR_CODE = 0x00004018,
VMX_VM_ENTRY_INSTRUCTION_LEN = 0x0000401a,
VMX_TPR_THRESHOLD = 0x0000401c,
VMX_SECONDARY_VM_EXEC_CONTROL = 0x0000401e,
VMX_PLE_GAP = 0x00004020,
VMX_PLE_WINDOW = 0x00004022,
VMX_VM_INSTRUCTION_ERROR = 0x00004400,
VMX_VM_EXIT_REASON = 0x00004402,
VMX_VM_EXIT_INTR_INFO = 0x00004404,
VMX_VM_EXIT_INTR_ERROR_CODE = 0x00004406,
VMX_IDT_VECTORING_INFO_FIELD = 0x00004408,
VMX_IDT_VECTORING_ERROR_CODE = 0x0000440a,
VMX_VM_EXIT_INSTRUCTION_LEN = 0x0000440c,
VMX_VMX_INSTRUCTION_INFO = 0x0000440e,
VMX_GUEST_ES_LIMIT = 0x00004800,
VMX_GUEST_CS_LIMIT = 0x00004802,
VMX_GUEST_SS_LIMIT = 0x00004804,
VMX_GUEST_DS_LIMIT = 0x00004806,
VMX_GUEST_FS_LIMIT = 0x00004808,
VMX_GUEST_GS_LIMIT = 0x0000480a,
VMX_GUEST_LDTR_LIMIT = 0x0000480c,
VMX_GUEST_TR_LIMIT = 0x0000480e,
VMX_GUEST_GDTR_LIMIT = 0x00004810,
VMX_GUEST_IDTR_LIMIT = 0x00004812,
VMX_GUEST_ES_AR_BYTES = 0x00004814,
VMX_GUEST_CS_AR_BYTES = 0x00004816,
VMX_GUEST_SS_AR_BYTES = 0x00004818,
VMX_GUEST_DS_AR_BYTES = 0x0000481a,
VMX_GUEST_FS_AR_BYTES = 0x0000481c,
VMX_GUEST_GS_AR_BYTES = 0x0000481e,
VMX_GUEST_LDTR_AR_BYTES = 0x00004820,
VMX_GUEST_TR_AR_BYTES = 0x00004822,
VMX_GUEST_INTERRUPTIBILITY_INFO = 0x00004824,
VMX_GUEST_ACTIVITY_STATE = 0X00004826,
VMX_GUEST_SYSENTER_CS = 0x0000482A,
VMX_HOST_IA32_SYSENTER_CS = 0x00004c00,
VMX_CR0_GUEST_HOST_MASK = 0x00006000,
VMX_CR4_GUEST_HOST_MASK = 0x00006002,
VMX_CR0_READ_SHADOW = 0x00006004,
VMX_CR4_READ_SHADOW = 0x00006006,
VMX_CR3_TARGET_VALUE0 = 0x00006008,
VMX_CR3_TARGET_VALUE1 = 0x0000600a,
VMX_CR3_TARGET_VALUE2 = 0x0000600c,
VMX_CR3_TARGET_VALUE3 = 0x0000600e,
VMX_EXIT_QUALIFICATION = 0x00006400,
VMX_GUEST_LINEAR_ADDRESS = 0x0000640a,
VMX_GUEST_CR0 = 0x00006800,
VMX_GUEST_CR3 = 0x00006802,
VMX_GUEST_CR4 = 0x00006804,
VMX_GUEST_ES_BASE = 0x00006806,
VMX_GUEST_CS_BASE = 0x00006808,
VMX_GUEST_SS_BASE = 0x0000680a,
VMX_GUEST_DS_BASE = 0x0000680c,
VMX_GUEST_FS_BASE = 0x0000680e,
VMX_GUEST_GS_BASE = 0x00006810,
VMX_GUEST_LDTR_BASE = 0x00006812,
VMX_GUEST_TR_BASE = 0x00006814,
VMX_GUEST_GDTR_BASE = 0x00006816,
VMX_GUEST_IDTR_BASE = 0x00006818,
VMX_GUEST_DR7 = 0x0000681a,
VMX_GUEST_RSP = 0x0000681c,
VMX_GUEST_RIP = 0x0000681e,
VMX_GUEST_RFLAGS = 0x00006820,
VMX_GUEST_PENDING_DBG_EXCEPTIONS = 0x00006822,
VMX_GUEST_SYSENTER_ESP = 0x00006824,
VMX_GUEST_SYSENTER_EIP = 0x00006826,
VMX_HOST_CR0 = 0x00006c00,
VMX_HOST_CR3 = 0x00006c02,
VMX_HOST_CR4 = 0x00006c04,
VMX_HOST_FS_BASE = 0x00006c06,
VMX_HOST_GS_BASE = 0x00006c08,
VMX_HOST_TR_BASE = 0x00006c0a,
VMX_HOST_GDTR_BASE = 0x00006c0c,
VMX_HOST_IDTR_BASE = 0x00006c0e,
VMX_HOST_IA32_SYSENTER_ESP = 0x00006c10,
VMX_HOST_IA32_SYSENTER_EIP = 0x00006c12,
VMX_HOST_RSP = 0x00006c14,
VMX_HOST_RIP = 0x00006c16
};
|