Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/vm/vmx-defs.h need to be fixed.

0001 /*                    The Quest Operating System
0002  *  Copyright (C) 2005-2010  Richard West, Boston University
0003  *
0004  *  This program is free software: you can redistribute it and/or modify
0005  *  it under the terms of the GNU General Public License as published by
0006  *  the Free Software Foundation, either version 3 of the License, or
0007  *  (at your option) any later version.
0008  *
0009  *  This program is distributed in the hope that it will be useful,
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012  *  GNU General Public License for more details.
0013  *
0014  *  You should have received a copy of the GNU General Public License
0015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0016  */
0017 
0018 #ifndef _VMX_DEFS_H_
0019 #define _VMX_DEFS_H_
0020 
0021 /* See Intel System Programming manual appendix H */
0022 
0023 
0024 /* 16-bit Control Field */
0025 #define VMXENC_VPID                           0x00000000
0026 
0027 
0028 /* 16-bit Guest State Fields */
0029 #define VMXENC_GUEST_ES_SEL                   0x00000800
0030 #define VMXENC_GUEST_CS_SEL                   0x00000802
0031 #define VMXENC_GUEST_SS_SEL                   0x00000804
0032 #define VMXENC_GUEST_DS_SEL                   0x00000806
0033 #define VMXENC_GUEST_FS_SEL                   0x00000808
0034 #define VMXENC_GUEST_GS_SEL                   0x0000080A
0035 #define VMXENC_GUEST_LDTR_SEL                 0x0000080C
0036 #define VMXENC_GUEST_TR_SEL                   0x0000080E
0037 
0038 
0039 /* 16-bit Host State Fields */
0040 #define VMXENC_HOST_ES_SEL                    0x00000C00
0041 #define VMXENC_HOST_CS_SEL                    0x00000C02
0042 #define VMXENC_HOST_SS_SEL                    0x00000C04
0043 #define VMXENC_HOST_DS_SEL                    0x00000C06
0044 #define VMXENC_HOST_FS_SEL                    0x00000C08
0045 #define VMXENC_HOST_GS_SEL                    0x00000C0A
0046 #define VMXENC_HOST_TR_SEL                    0x00000C0C
0047 
0048 
0049 /* 64-bit Control Fields */
0050 
0051 /* Address of I/O bitmap A (full) */
0052 #define VMXENC_IO_BITMAP_A                    0x00002000
0053 
0054 /* Address of I/O bitmap A (high) */
0055 #define VMXENC_IO_BITMAP_A_HI                 0x00002001
0056 
0057 /* Address of I/O bitmap B (full) */
0058 #define VMXENC_IO_BITMAP_B                    0x00002002
0059 
0060 /* Address of I/O bitmap B (high) */
0061 #define VMXENC_IO_BITMAP_B_HI                 0x00002003
0062 
0063 /* Address of MSR bitmaps (full) */
0064 #define VMXENC_MSR_BITMAPS                    0x00002004
0065 
0066 /* Address of MSR bitmaps (high) */
0067 #define VMXENC_MSR_BITMAPS_HI                 0x00002005
0068 
0069 /* VM-exit MSR-store address (full) */
0070 #define VMXENC_VM_EXIT_MSR_STORE_ADDR         0x00002006
0071 
0072 /* VM-exit MSR-store address (high) */
0073 #define VMXENC_VM_EXIT_MSR_STORE_ADDR_HI      0x00002007
0074 
0075 /* VM-exit MSR-load address (full) */
0076 #define VMXENC_VM_EXIT_MSR_LOAD_ADDR          0x00002008
0077 
0078 /* VM-exit MSR-load address (high) */
0079 #define VMXENC_VM_EXIT_MSR_LOAD_ADDR_HI       0x00002009
0080 
0081 /* VM-entry MSR-load address (full) */
0082 #define VMXENC_VM_ENTRY_MSR_LOAD_ADDR         0x0000200A
0083 
0084 /* VM-entry MSR-load address (high) */
0085 #define VMXENC_VM_ENTRY_MSR_LOAD_ADDR_HI      0x0000200B
0086 
0087 /* Executive-VMCS pointer (full) */
0088 #define VMXENC_EXECUTIVE_VMCS_PTR             0x0000200C
0089 
0090 /* Executive-VMCS pointer (high) */
0091 #define VMXENC_EXECUTIVE_VMCS_PTR_HI          0x0000200D
0092 
0093 /* TSC offset (full) */
0094 #define VMXENC_TSC_OFFSET                     0x00002010
0095 
0096 /* TSC offset (high) */
0097 #define VMXENC_TSC_OFFSET_HI                  0x00002011
0098 
0099 /* Virtual-APIC address (full) */
0100 #define VMXENC_VIRTUAL_APIC_ADDR              0x00002012
0101 
0102 /* Virtual-APIC address (high) */
0103 #define VMXENC_VIRTUAL_APIC_ADDR_HI           0x00002013
0104 
0105 /* APIC-access address (full)3 */
0106 #define VMXENC_APIC_ACCESS_ADDR               0x00002014
0107 
0108 /* APIC-access address  (high) */
0109 #define VMXENC_APIC_ACCESS_ADDR_HI            0x00002015
0110 
0111 /* EPT pointer (EPTP; full) */
0112 #define VMXENC_EPT_PTR                        0x0000201A
0113 
0114 /* EPT pointer (EPTP; high) */
0115 #define VMXENC_EPT_PTR_HI                     0x0000201B
0116 
0117 
0118 /* 64-bit Read Only Data fields */
0119 #define VMXENC_GUEST_PHYS_ADDR                0x00002400
0120 #define VMXENC_GUEST_PHYS_ADDR_HI             0x00002401
0121 
0122 
0123 /* 64-bit Guest State fields */
0124 
0125 /* VMCS link pointer (full) */
0126 #define VMXENC_VMCS_LINK_PTR                  0x00002800
0127 
0128 /* VMCS link pointer (high) */
0129 #define VMXENC_VMCS_LINK_PTR_HI               0x00002801
0130 
0131 /* Guest IA32_DEBUGCTL (full) */
0132 #define VMXENC_GUEST_IA32_DEBUGCTL            0x00002802
0133 
0134 /* Guest IA32_DEBUGCTL (high) */
0135 #define VMXENC_GUEST_IA32_DEBUGCTL_HI         0x00002803
0136 
0137 /* Guest IA32_PAT (full) */
0138 #define VMXENC_GUEST_IA32_PAT                 0x00002804
0139 
0140 /* Guest IA32_PAT (high) */
0141 #define VMXENC_GUEST_IA32_PAT_HI              0x00002805
0142 
0143 /* Guest IA32_EFER (full) */
0144 #define VMXENC_GUEST_IA32_EFER                0x00002806
0145 
0146 /* Guest IA32_EFER (high) */
0147 #define VMXENC_GUEST_IA32_EFER_HI             0x00002807
0148 
0149 /* Guest IA32_PERF_GLOBAL_CTRL (full) */
0150 #define VMXENC_GUEST_IA32_GLOBAL_CTRL         0x00002808
0151 
0152 /* Guest IA32_PERF_GLOBAL_CTRL (high) */
0153 #define VMXENC_GUEST_IA32_GLOBAL_CTRL_HI      0x00002809
0154 
0155 /* Guest PDPTE0 (full) */
0156 #define VMXENC_GUEST_PDPTE0                   0x0000280A
0157 
0158 /* Guest PDPTE0 (high) */
0159 #define VMXENC_GUEST_PDPTE0_HI                0x0000280B
0160 
0161 /* Guest PDPTE1 (full) */
0162 #define VMXENC_GUEST_PDPTE1                   0x0000280C
0163 
0164 /* Guest PDPTE1 (high) */
0165 #define VMXENC_GUEST_PDPTE1_HI                0x0000280D
0166 
0167 /* Guest PDPTE2 (full) */
0168 #define VMXENC_GUEST_PDPTE2                   0x0000280E
0169 
0170 /* Guest PDPTE2 (high) */
0171 #define VMXENC_GUEST_PDPTE2_HI                0x0000280F
0172 
0173 /* Guest PDPTE3 (full) */
0174 #define VMXENC_GUEST_PDPTE3                   0x00002810
0175 
0176 /* Guest PDPTE3 (high) */
0177 #define VMXENC_GUEST_PDPTE3_HI                0x00002811
0178 
0179 
0180 /* 64-bit Host State fields */
0181 
0182 /* Host IA32_PAT (full) */
0183 #define VMXENC_HOST_IA32_PAT                  0x00002C00
0184 
0185 /* Host IA32_PAT (high) */
0186 #define VMXENC_HOST_IA32_PAT_HI               0x00002C01
0187 
0188 /* Host IA32_EFER (full) */
0189 #define VMXENC_HOST_IA32_EFER                 0x00002C02
0190 
0191 /* Host IA32_EFER (high) */
0192 #define VMXENC_HOST_IA32_EFER_HI              0x00002C03
0193 
0194 /* Host IA32_PERF_GLOBAL_CTRL (full) */
0195 #define VMXENC_HOST_IA32_GLOBAL_CTRL          0x00002C04
0196 
0197 /* Host IA32_PERF_GLOBAL_CTRL (high) */
0198 
0199 
0200 /* 32-bit Control fields */
0201 
0202 #define VMXENC_HOST_IA32_GLOBAL_CTRL_HI       0x00002C05
0203 
0204 /* Pin-based VM-execution controls */
0205 #define VMXENC_PINBASED_VM_EXEC_CTRLS         0x00004000
0206 
0207 /* Primary processor-based VM-execution controls */
0208 #define VMXENC_PROCBASED_VM_EXEC_CTRLS        0x00004002
0209 
0210 /* Exception bitmap */
0211 #define VMXENC_EXCEPTION_BITMAP               0x00004004
0212 
0213 /* Page-fault error-code mask */
0214 #define VMXENC_PAGE_FAULT_ERRCODE_MASK        0x00004006
0215 
0216 /* Page-fault error-code match */
0217 #define VMXENC_PAGE_FAULT_ERRCODE_MATCH       0x00004008
0218 
0219 /* CR3-target count */
0220 #define VMXENC_CR3_TARGET_COUNT               0x0000400A
0221 
0222 /* VM-exit controls */
0223 #define VMXENC_VM_EXIT_CTRLS                  0x0000400C
0224 
0225 /* VM-exit MSR-store count */
0226 #define VMXENC_VM_EXIT_MSR_STORE_COUNT        0x0000400E
0227 
0228 /* VM-exit MSR-load count */
0229 #define VMXENC_VM_EXIT_MSR_LOAD_COUNT         0x00004010
0230 
0231 /* VM-entry controls */
0232 #define VMXENC_VM_ENTRY_CTRLS                 0x00004012
0233 
0234 /* VM-entry MSR-load count */
0235 #define VMXENC_VM_ENTRY_MSR_LOAD_COUNT        0x00004014
0236 
0237 /* VM-entry interruption-information field */
0238 #define VMXENC_VM_ENTRY_INTERRUPT_INFO        0x00004016
0239 
0240 /* VM-entry exception error code */
0241 #define VMXENC_VM_ENTRY_EXCEPTION_ERRCODE     0x00004018
0242 
0243 /* VM-entry instruction length */
0244 #define VMXENC_VM_ENTRY_INSTR_LEN             0x0000401A
0245 
0246 /* TPR threshold */
0247 #define VMXENC_TPR_THRESHOLD                  0x0000401C
0248 
0249 /* Secondary processor-based VM-execution controls */
0250 #define VMXENC_PROCBASED_VM_EXEC_CTRLS2       0x0000401E
0251 
0252 
0253 /* 32-bit Read Only Data fields */
0254 
0255 /* VM-instruction error */
0256 #define VMXENC_VM_INSTR_ERROR                 0x00004400
0257 
0258 /* Exit reason */
0259 #define VMXENC_EXIT_REASON                    0x00004402
0260 
0261 /* VM-exit interruption information */
0262 #define VMXENC_VM_EXIT_INTERRUPT_INFO         0x00004404
0263 
0264 /* VM-exit interruption error code */
0265 #define VMXENC_VM_EXIT_INTERRUPT_ERRCODE      0x00004406
0266 
0267 /* IDT-vectoring information field */
0268 #define VMXENC_IDT_VECTORING_INFO             0x00004408
0269 
0270 /* IDT-vectoring error code */
0271 #define VMXENC_IDT_VECTORING_ERRCODE          0x0000440A
0272 
0273 /* VM-exit instruction length */
0274 #define VMXENC_VM_EXIT_INSTR_LEN              0x0000440C
0275 
0276 /* VM-exit instruction information */
0277 #define VMXENC_VM_EXIT_INSTR_INFO             0x0000440E
0278 
0279 
0280 /* 32-bit Guest State fields */
0281 
0282 /* Guest ES limit */
0283 #define VMXENC_GUEST_ES_LIMIT                 0x00004800
0284 
0285 /* Guest CS limit */
0286 #define VMXENC_GUEST_CS_LIMIT                 0x00004802
0287 
0288 /* Guest SS limit */
0289 #define VMXENC_GUEST_SS_LIMIT                 0x00004804
0290 
0291 /* Guest DS limit */
0292 #define VMXENC_GUEST_DS_LIMIT                 0x00004806
0293 
0294 /* Guest FS limit */
0295 #define VMXENC_GUEST_FS_LIMIT                 0x00004808
0296 
0297 /* Guest GS limit */
0298 #define VMXENC_GUEST_GS_LIMIT                 0x0000480A
0299 
0300 /* Guest LDTR limit */
0301 #define VMXENC_GUEST_LDTR_LIMIT               0x0000480C
0302 
0303 /* Guest TR limit */
0304 #define VMXENC_GUEST_TR_LIMIT                 0x0000480E
0305 
0306 /* Guest GDTR limit */
0307 #define VMXENC_GUEST_GDTR_LIMIT               0x00004810
0308 
0309 /* Guest IDTR limit */
0310 #define VMXENC_GUEST_IDTR_LIMIT               0x00004812
0311 
0312 /* Guest ES access rights */
0313 #define VMXENC_GUEST_ES_ACCESS                0x00004814
0314 
0315 /* Guest CS access rights */
0316 #define VMXENC_GUEST_CS_ACCESS                0x00004816
0317 
0318 /* Guest SS access rights */
0319 #define VMXENC_GUEST_SS_ACCESS                0x00004818
0320 
0321 /* Guest DS access rights */
0322 #define VMXENC_GUEST_DS_ACCESS                0x0000481A
0323 
0324 /* Guest FS access rights */
0325 #define VMXENC_GUEST_FS_ACCESS                0x0000481C
0326 
0327 /* Guest GS access rights */
0328 #define VMXENC_GUEST_GS_ACCESS                0x0000481E
0329 
0330 /* Guest LDTR access rights */
0331 #define VMXENC_GUEST_LDTR_ACCESS              0x00004820
0332 
0333 /* Guest TR access rights */
0334 #define VMXENC_GUEST_TR_ACCESS                0x00004822
0335 
0336 /* Guest interruptibility state */
0337 #define VMXENC_GUEST_INTERRUPTIBILITY         0x00004824
0338 
0339 /* Guest activity state */
0340 #define VMXENC_GUEST_ACTIVITY                 0x00004826
0341 
0342 /* Guest SMBASE */
0343 #define VMXENC_GUEST_SMBASE                   0x00004828
0344 
0345 /* Guest IA32_SYSENTER_CS */
0346 #define VMXENC_GUEST_IA32_SYSENTER_CS         0x0000482A
0347 
0348 /* VMX-preemption timer value */
0349 #define VMXENC_VMX_PREEMPT_TIMER_VAL          0x0000482E
0350 
0351 
0352 /* 32-bit Host State field */
0353 
0354 /* Host IA32_SYSENTER_CS */
0355 #define VMXENC_HOST_IA32_SYSENTER_CS          0x00004C00
0356 
0357 
0358 /* Natural-width Control fields */
0359 
0360 /* CR0 guest/host mask */
0361 #define VMXENC_CR0_GUEST_HOST_MASK            0x00006000
0362 
0363 /* CR4 guest/host mask */
0364 #define VMXENC_CR4_GUEST_HOST_MASK            0x00006002
0365 
0366 /* CR0 read shadow */
0367 #define VMXENC_CR0_READ_SHADOW                0x00006004
0368 
0369 /* CR4 read shadow */
0370 #define VMXENC_CR4_READ_SHADOW                0x00006006
0371 
0372 /* CR3-target value 0 */
0373 #define VMXENC_CR3_TARGET_VAL0                0x00006008
0374 
0375 /* CR3-target value 1 */
0376 #define VMXENC_CR3_TARGET_VAL1                0x0000600A
0377 
0378 /* CR3-target value 2 */
0379 #define VMXENC_CR3_TARGET_VAL2                0x0000600C
0380 
0381 /* CR3-target value 3 */
0382 #define VMXENC_CR3_TARGET_VAL3                0x0000600E
0383 
0384 
0385 /* Natural-width Read Only Data fields */
0386 
0387 /* Exit qualification */
0388 #define VMXENC_EXIT_QUAL                      0x00006400
0389 
0390 /* I/O RCX */
0391 #define VMXENC_IO_RCX                         0x00006402
0392 
0393 /* I/O RSI */
0394 #define VMXENC_IO_RSI                         0x00006404
0395 
0396 /* I/O RDI */
0397 #define VMXENC_IO_RDI                         0x00006406
0398 
0399 /* I/O RIP */
0400 #define VMXENC_IO_RIP                         0x00006408
0401 
0402 /* Guest-linear address */
0403 #define VMXENC_GUEST_LINEAR_ADDR              0x0000640A
0404 
0405 
0406 /* Natural-width Guest State fields */
0407 
0408 /* Guest CR0 */
0409 #define VMXENC_GUEST_CR0                      0x00006800
0410 
0411 /* Guest CR3 */
0412 #define VMXENC_GUEST_CR3                      0x00006802
0413 
0414 /* Guest CR4 */
0415 #define VMXENC_GUEST_CR4                      0x00006804
0416 
0417 /* Guest ES base */
0418 #define VMXENC_GUEST_ES_BASE                  0x00006806
0419 
0420 /* Guest CS base */
0421 #define VMXENC_GUEST_CS_BASE                  0x00006808
0422 
0423 /* Guest SS base */
0424 #define VMXENC_GUEST_SS_BASE                  0x0000680A
0425 
0426 /* Guest DS base */
0427 #define VMXENC_GUEST_DS_BASE                  0x0000680C
0428 
0429 /* Guest FS base */
0430 #define VMXENC_GUEST_FS_BASE                  0x0000680E
0431 
0432 /* Guest GS base */
0433 #define VMXENC_GUEST_GS_BASE                  0x00006810
0434 
0435 /* Guest LDTR base */
0436 #define VMXENC_GUEST_LDTR_BASE                0x00006812
0437 
0438 /* Guest TR base */
0439 #define VMXENC_GUEST_TR_BASE                  0x00006814
0440 
0441 /* Guest GDTR base */
0442 #define VMXENC_GUEST_GDTR_BASE                0x00006816
0443 
0444 /* Guest IDTR base */
0445 #define VMXENC_GUEST_IDTR_BASE                0x00006818
0446 
0447 /* Guest DR7 */
0448 #define VMXENC_GUEST_DR7                      0x0000681A
0449 
0450 /* Guest RSP */
0451 #define VMXENC_GUEST_RSP                      0x0000681C
0452 
0453 /* Guest RIP */
0454 #define VMXENC_GUEST_RIP                      0x0000681E
0455 
0456 /* Guest RFLAGS */
0457 #define VMXENC_GUEST_RFLAGS                   0x00006820
0458 
0459 /* Guest pending debug exceptions */
0460 #define VMXENC_GUEST_PENDING_DEBUG_EXCEPTIONS 0x00006822
0461 
0462 /* Guest IA32_SYSENTER_ESP */
0463 #define VMXENC_GUEST_IA32_SYSENTER_ESP        0x00006824
0464 
0465 /* Guest IA32_SYSENTER_EIP */
0466 #define VMXENC_GUEST_IA32_SYSENTER_EIP        0x00006826
0467 
0468 
0469 /* Natural-width Host State fields */
0470 
0471 /* Host CR0 */
0472 #define VMXENC_HOST_CR0                       0x00006C00
0473 
0474 /* Host CR3 */
0475 #define VMXENC_HOST_CR3                       0x00006C02
0476 
0477 /* Host CR4 */
0478 #define VMXENC_HOST_CR4                       0x00006C04
0479 
0480 /* Host FS base */
0481 #define VMXENC_HOST_FS_BASE                   0x00006C06
0482 
0483 /* Host GS base */
0484 #define VMXENC_HOST_GS_BASE                   0x00006C08
0485 
0486 /* Host TR base */
0487 #define VMXENC_HOST_TR_BASE                   0x00006C0A
0488 
0489 /* Host GDTR base */
0490 #define VMXENC_HOST_GDTR_BASE                 0x00006C0C
0491 
0492 /* Host IDTR base */
0493 #define VMXENC_HOST_IDTR_BASE                 0x00006C0E
0494 
0495 /* Host IA32_SYSENTER_ESP */
0496 #define VMXENC_HOST_IA32_SYSENTER_ESP         0x00006C10
0497 
0498 /* Host IA32_SYSENTER_EIP */
0499 #define VMXENC_HOST_IA32_SYSENTER_EIP         0x00006C12
0500 
0501 /* Host RSP */
0502 #define VMXENC_HOST_RSP                       0x00006C14
0503 
0504 /* Host RIP */
0505 #define VMXENC_HOST_RIP                       0x00006C16
0506 
0507 
0508 #endif
0509 
0510 /*
0511  * Local Variables:
0512  * indent-tabs-mode: nil
0513  * mode: C
0514  * c-file-style: "gnu"
0515  * c-basic-offset: 2
0516  * End:
0517  */
0518 
0519 /* vi: set et sw=2 sts=2: */