Changeset 96711 in vbox
- Timestamp:
- Sep 13, 2022 7:03:12 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r96601 r96711 409 409 /** @} */ 410 410 411 /** @name VMX Extended Page Tables (EPT) Common Bits 411 412 /** @name VMX Extended Page Tables (EPT) Common Bits. 412 413 * @{ */ 413 414 /** Bit 0 - Readable (we often think of it as present). */ 414 #define EPT_E_BIT_READ 0415 #define EPT_E_READ RT_BIT_64(EPT_E_BIT_READ)/**< @see EPT_E_BIT_READ */415 #define EPT_E_BIT_READ 0 416 #define EPT_E_READ RT_BIT_64(EPT_E_BIT_READ) /**< @see EPT_E_BIT_READ */ 416 417 /** Bit 1 - Writable. */ 417 #define EPT_E_BIT_WRITE 1418 #define EPT_E_WRITE RT_BIT_64(EPT_E_BIT_WRITE)/**< @see EPT_E_BIT_WRITE */418 #define EPT_E_BIT_WRITE 1 419 #define EPT_E_WRITE RT_BIT_64(EPT_E_BIT_WRITE) /**< @see EPT_E_BIT_WRITE */ 419 420 /** Bit 2 - Executable. 420 421 * @note This controls supervisor instruction fetching if mode-based 421 422 * execution control is enabled. */ 422 #define EPT_E_BIT_EXECUTE 2423 #define EPT_E_EXECUTE RT_BIT_64(EPT_E_BIT_EXECUTE)/**< @see EPT_E_BIT_EXECUTE */423 #define EPT_E_BIT_EXECUTE 2 424 #define EPT_E_EXECUTE RT_BIT_64(EPT_E_BIT_EXECUTE) /**< @see EPT_E_BIT_EXECUTE */ 424 425 /** Bits 3-5 - Memory type mask (leaf only, MBZ). 425 426 * The memory type is only applicable for leaf entries and MBZ for 426 427 * non-leaf (causes miconfiguration exit). */ 427 #define EPT_E_MEMTYPE_MASK UINT64_C(0x0038)428 #define EPT_E_MEMTYPE_MASK UINT64_C(0x0038) 428 429 /** Bits 3-5 - Memory type shifted mask. */ 429 #define EPT_E_MEMTYPE_SMASK UINT64_C(0x0007)430 #define EPT_E_MEMTYPE_SMASK UINT64_C(0x0007) 430 431 /** Bits 3-5 - Memory type shift count. */ 431 #define EPT_E_MEMTYPE_SHIFT 3432 #define EPT_E_MEMTYPE_SHIFT 3 432 433 /** Bits 3-5 - Memory type: UC (Uncacheable). */ 433 #define EPT_E_MEMTYPE_UC (UINT64_C(0) << EPT_E_MEMTYPE_SHIFT)434 #define EPT_E_MEMTYPE_UC (UINT64_C(0) << EPT_E_MEMTYPE_SHIFT) 434 435 /** Bits 3-5 - Memory type: WC (Write Combining). */ 435 #define EPT_E_MEMTYPE_WC (UINT64_C(1) << EPT_E_MEMTYPE_SHIFT)436 #define EPT_E_MEMTYPE_WC (UINT64_C(1) << EPT_E_MEMTYPE_SHIFT) 436 437 /** Bits 3-5 - Memory type: Invalid (2). */ 437 #define EPT_E_MEMTYPE_INVALID_2 (UINT64_C(2) << EPT_E_MEMTYPE_SHIFT)438 #define EPT_E_MEMTYPE_INVALID_2 (UINT64_C(2) << EPT_E_MEMTYPE_SHIFT) 438 439 /** Bits 3-5 - Memory type: Invalid (3). */ 439 #define EPT_E_MEMTYPE_INVALID_3 (UINT64_C(3) << EPT_E_MEMTYPE_SHIFT)440 #define EPT_E_MEMTYPE_INVALID_3 (UINT64_C(3) << EPT_E_MEMTYPE_SHIFT) 440 441 /** Bits 3-5 - Memory type: WT (Write Through). */ 441 #define EPT_E_MEMTYPE_WT (UINT64_C(4) << EPT_E_MEMTYPE_SHIFT)442 #define EPT_E_MEMTYPE_WT (UINT64_C(4) << EPT_E_MEMTYPE_SHIFT) 442 443 /** Bits 3-5 - Memory type: WP (Write Protected). */ 443 #define EPT_E_MEMTYPE_WP (UINT64_C(5) << EPT_E_MEMTYPE_SHIFT)444 #define EPT_E_MEMTYPE_WP (UINT64_C(5) << EPT_E_MEMTYPE_SHIFT) 444 445 /** Bits 3-5 - Memory type: WB (Write Back). */ 445 #define EPT_E_MEMTYPE_WB (UINT64_C(6) << EPT_E_MEMTYPE_SHIFT)446 #define EPT_E_MEMTYPE_WB (UINT64_C(6) << EPT_E_MEMTYPE_SHIFT) 446 447 /** Bits 3-5 - Memory type: Invalid (7). */ 447 #define EPT_E_MEMTYPE_INVALID_7 (UINT64_C(7) << EPT_E_MEMTYPE_SHIFT) 448 448 #define EPT_E_MEMTYPE_INVALID_7 (UINT64_C(7) << EPT_E_MEMTYPE_SHIFT) 449 449 /** Bit 6 - Ignore page attribute table (leaf, MBZ). */ 450 #define EPT_E_BIT_IGNORE_PAT 6451 #define EPT_E_IGNORE_PAT RT_BIT_64(EPT_E_BIT_IGNORE_PAT)/**< @see EPT_E_BIT_IGNORE_PAT */450 #define EPT_E_BIT_IGNORE_PAT 6 451 #define EPT_E_IGNORE_PAT RT_BIT_64(EPT_E_BIT_IGNORE_PAT) /**< @see EPT_E_BIT_IGNORE_PAT */ 452 452 /** Bit 7 - Leaf entry (MBZ in PML4, ignored in PT). */ 453 #define EPT_E_BIT_LEAF 7454 #define EPT_E_LEAF RT_BIT_64(EPT_E_BIT_LEAF)/**< @see EPT_E_BIT_LEAF */453 #define EPT_E_BIT_LEAF 7 454 #define EPT_E_LEAF RT_BIT_64(EPT_E_BIT_LEAF) /**< @see EPT_E_BIT_LEAF */ 455 455 /** Bit 8 - Accessed (all levels). 456 456 * @note Ignored and not written when EPTP bit 6 is 0. */ 457 #define EPT_E_BIT_ACCESSED 8458 #define EPT_E_ACCESSED RT_BIT_64(EPT_E_BIT_ACCESSED)/**< @see EPT_E_BIT_ACCESSED */457 #define EPT_E_BIT_ACCESSED 8 458 #define EPT_E_ACCESSED RT_BIT_64(EPT_E_BIT_ACCESSED) /**< @see EPT_E_BIT_ACCESSED */ 459 459 /** Bit 9 - Dirty (leaf only). 460 460 * @note Ignored and not written when EPTP bit 6 is 0. */ 461 #define EPT_E_BIT_DIRTY 9462 #define EPT_E_DIRTY RT_BIT_64(EPT_E_BIT_DIRTY)/**< @see EPT_E_BIT_DIRTY */461 #define EPT_E_BIT_DIRTY 9 462 #define EPT_E_DIRTY RT_BIT_64(EPT_E_BIT_DIRTY) /**< @see EPT_E_BIT_DIRTY */ 463 463 /** Bit 10 - Executable for usermode. 464 464 * @note This ignored if mode-based execution control is disabled. */ 465 #define EPT_E_BIT_USER_EXECUTE 10 466 #define EPT_E_USER_EXECUTE RT_BIT_64(EPT_E_BIT_USER_EXECUTE) /**< @see EPT_E_BIT_USER_EXECUTE */ 467 468 /* 11 is always ignored (at time of writing) */ 469 465 #define EPT_E_BIT_USER_EXECUTE 10 466 #define EPT_E_USER_EXECUTE RT_BIT_64(EPT_E_BIT_USER_EXECUTE) /**< @see EPT_E_BIT_USER_EXECUTE */ 467 /* Bit 11 is always ignored. */ 470 468 /** Bits 12-51 - Physical Page number of the next level. */ 471 #define EPT_E_PG_MASK UINT64_C(0x000ffffffffff000) 472 469 #define EPT_E_PG_MASK UINT64_C(0x000ffffffffff000) 473 470 /** Bit 58 - Page-write access (leaf only, ignored). 474 471 * @note Ignored if EPT page-write control is disabled. */ 475 472 #define EPT_E_BIT_PAGING_WRITE 58 476 473 #define EPT_E_PAGING_WRITE RT_BIT_64(EPT_E_BIT_PAGING_WRITE) /**< @see EPT_E_BIT_PAGING_WRITE*/ 477 478 474 /* Bit 59 is always ignored. */ 479 480 475 /** Bit 60 - Supervisor shadow stack (leaf only, ignored). 481 476 * @note Ignored if EPT bit 7 is 0. */ 482 477 #define EPT_E_BIT_SUPER_SHW_STACK 60 483 478 #define EPT_E_SUPER_SHW_STACK RT_BIT_64(EPT_E_BIT_SUPER_SHW_STACK) /**< @see EPT_E_BIT_SUPER_SHW_STACK */ 484 485 479 /** Bit 61 - Sub-page write permission (leaf only, ignored). 486 480 * @note Ignored if sub-page write permission for EPT is disabled. */ 487 481 #define EPT_E_BIT_SUBPAGE_WRITE_PERM 61 488 482 #define EPT_E_SUBPAGE_WRITE_PERM RT_BIT_64(EPT_E_BIT_SUBPAGE_WRITE_PERM) /**< @see EPT_E_BIT_SUBPAGE_WRITE_PERM*/ 489 490 483 /* Bit 62 is always ignored. */ 491 492 484 /** Bit 63 - Suppress \#VE (leaf only, ignored). 493 485 * @note Ignored if EPT violation to \#VE conversion is disabled. */
Note:
See TracChangeset
for help on using the changeset viewer.