Changeset 91357 in vbox
- Timestamp:
- Sep 24, 2021 9:28:57 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r91344 r91357 1757 1757 1758 1758 /** @name Extended Page Table Pointer (EPTP) 1759 * @{ 1760 */ 1761 /** Uncachable EPT paging structure memory type. */ 1762 #define VMX_EPT_MEMTYPE_UC 0 1763 /** Write-back EPT paging structure memory type. */ 1764 #define VMX_EPT_MEMTYPE_WB 6 1765 /** Shift value to get the EPT page walk length (bits 5-3) */ 1766 #define VMX_EPT_PAGE_WALK_LENGTH_SHIFT 3 1767 /** Mask value to get the EPT page walk length (bits 5-3) */ 1768 #define VMX_EPT_PAGE_WALK_LENGTH_MASK 7 1769 /** Default EPT page-walk length (1 less than the actual EPT page-walk 1770 * length) */ 1771 #define VMX_EPT_PAGE_WALK_LENGTH_DEFAULT 3 1759 * In accordance with the VT-x spec. 1760 * See Intel spec. 23.6.11 "Extended-Page-Table Pointer (EPTP)". 1761 * @{ 1762 */ 1763 /** EPTP memory type: Uncachable. */ 1764 #define VMX_EPTP_MEMTYPE_UC 0 1765 /** EPTP memory type: Write Back. */ 1766 #define VMX_EPTP_MEMTYPE_WB 6 1767 /** Page-walk length for PML4 (4-level paging). */ 1768 #define VMX_EPTP_PAGE_WALK_LENGTH_4 3 1769 1770 /** Bit fields for EPTP. */ 1771 #define VMX_BF_EPTP_MEMTYPE_SHIFT 0 1772 #define VMX_BF_EPTP_MEMTYPE_MASK UINT64_C(0x0000000000000007) 1773 #define VMX_BF_EPTP_PAGE_WALK_LENGTH_SHIFT 3 1774 #define VMX_BF_EPTP_PAGE_WALK_LENGTH_MASK UINT64_C(0x0000000000000038) 1775 #define VMX_BF_EPTP_ACCESS_DIRTY_SHIFT 6 1776 #define VMX_BF_EPTP_ACCESS_DIRTY_MASK UINT64_C(0x0000000000000040) 1777 #define VMX_BF_EPTP_SUPER_SHW_STACK_SHIFT 7 1778 #define VMX_BF_EPTP_SUPER_SHW_STACK_MASK UINT64_C(0x0000000000000080) 1779 #define VMX_BF_EPTP_RSVD_8_11_SHIFT 8 1780 #define VMX_BF_EPTP_RSVD_8_11_MASK UINT64_C(0x0000000000000f00) 1781 #define VMX_BF_EPTP_PML4_ADDR_SHIFT 12 1782 #define VMX_BF_EPTP_PML4_ADDR_MASK UINT64_C(0xfffffffffffff000) 1783 RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_EPTP_, UINT64_C(0), UINT64_MAX, 1784 (MEMTYPE, PAGE_WALK_LENGTH, ACCESS_DIRTY, SUPER_SHW_STACK, RSVD_8_11, PML4_ADDR)); 1772 1785 /** @} */ 1773 1786 -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r91343 r91357 5881 5881 5882 5882 /* VMX_EPT_MEMTYPE_WB support is already checked in hmR0VmxSetupTaggedTlb(). */ 5883 pVmcsInfo->HCPhysEPTP |= VMX_EPT_MEMTYPE_WB5884 | (VMX_EPT_PAGE_WALK_LENGTH_DEFAULT << VMX_EPT_PAGE_WALK_LENGTH_SHIFT);5883 pVmcsInfo->HCPhysEPTP |= RT_BF_MAKE(VMX_BF_EPTP_MEMTYPE, VMX_EPTP_MEMTYPE_WB) 5884 | RT_BF_MAKE(VMX_BF_EPTP_PAGE_WALK_LENGTH, VMX_EPTP_PAGE_WALK_LENGTH_4); 5885 5885 5886 5886 /* Validate. See Intel spec. 26.2.1 "Checks on VMX Controls" */
Note:
See TracChangeset
for help on using the changeset viewer.