Changeset 91358 in vbox
- Timestamp:
- Sep 24, 2021 9:49:20 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r91357 r91358 1665 1665 #define MSR_IA32_VMX_EPT_VPID_CAP_PAGE_WALK_LENGTH_5 RT_BIT_64(7) 1666 1666 /** Supports EPT paging-structure memory type to be uncacheable. */ 1667 #define MSR_IA32_VMX_EPT_VPID_CAP_ EMT_UCRT_BIT_64(8)1667 #define MSR_IA32_VMX_EPT_VPID_CAP_MEMTYPE_UC RT_BIT_64(8) 1668 1668 /** Supports EPT paging structure memory type to be write-back. */ 1669 #define MSR_IA32_VMX_EPT_VPID_CAP_ EMT_WBRT_BIT_64(14)1669 #define MSR_IA32_VMX_EPT_VPID_CAP_MEMTYPE_WB RT_BIT_64(14) 1670 1670 /** Supports EPT PDE to map a 2 MB page. */ 1671 1671 #define MSR_IA32_VMX_EPT_VPID_CAP_PDE_2M RT_BIT_64(16) … … 1675 1675 #define MSR_IA32_VMX_EPT_VPID_CAP_INVEPT RT_BIT_64(20) 1676 1676 /** Supports accessed and dirty flags for EPT. */ 1677 #define MSR_IA32_VMX_EPT_VPID_CAP_ EPT_ACCESS_DIRTYRT_BIT_64(21)1677 #define MSR_IA32_VMX_EPT_VPID_CAP_ACCESS_DIRTY RT_BIT_64(21) 1678 1678 /** Supports advanced VM-exit info. for EPT violations. */ 1679 #define MSR_IA32_VMX_EPT_VPID_CAP_ADVEXITINFO_EPT 1679 #define MSR_IA32_VMX_EPT_VPID_CAP_ADVEXITINFO_EPT_VIOLATION RT_BIT_64(22) 1680 1680 /** Supports supervisor shadow-stack control. */ 1681 1681 #define MSR_IA32_VMX_EPT_VPID_CAP_SUPER_SHW_STACK RT_BIT_64(23) … … 1704 1704 #define VMX_BF_EPT_VPID_CAP_RSVD_7_SHIFT 7 1705 1705 #define VMX_BF_EPT_VPID_CAP_RSVD_7_MASK UINT64_C(0x0000000000000080) 1706 #define VMX_BF_EPT_VPID_CAP_ EMT_UC_SHIFT81707 #define VMX_BF_EPT_VPID_CAP_ EMT_UC_MASKUINT64_C(0x0000000000000100)1706 #define VMX_BF_EPT_VPID_CAP_MEMTYPE_UC_SHIFT 8 1707 #define VMX_BF_EPT_VPID_CAP_MEMTYPE_UC_MASK UINT64_C(0x0000000000000100) 1708 1708 #define VMX_BF_EPT_VPID_CAP_RSVD_9_13_SHIFT 9 1709 1709 #define VMX_BF_EPT_VPID_CAP_RSVD_9_13_MASK UINT64_C(0x0000000000003e00) 1710 #define VMX_BF_EPT_VPID_CAP_ EMT_WB_SHIFT141711 #define VMX_BF_EPT_VPID_CAP_ EMT_WB_MASKUINT64_C(0x0000000000004000)1710 #define VMX_BF_EPT_VPID_CAP_MEMTYPE_WB_SHIFT 14 1711 #define VMX_BF_EPT_VPID_CAP_MEMTYPE_WB_MASK UINT64_C(0x0000000000004000) 1712 1712 #define VMX_BF_EPT_VPID_CAP_RSVD_15_SHIFT 15 1713 1713 #define VMX_BF_EPT_VPID_CAP_RSVD_15_MASK UINT64_C(0x0000000000008000) … … 1720 1720 #define VMX_BF_EPT_VPID_CAP_INVEPT_SHIFT 20 1721 1721 #define VMX_BF_EPT_VPID_CAP_INVEPT_MASK UINT64_C(0x0000000000100000) 1722 #define VMX_BF_EPT_VPID_CAP_ EPT_ACCESS_DIRTY_SHIFT211723 #define VMX_BF_EPT_VPID_CAP_ EPT_ACCESS_DIRTY_MASKUINT64_C(0x0000000000200000)1724 #define VMX_BF_EPT_VPID_CAP_ADVEXITINFO_EPT_ SHIFT221725 #define VMX_BF_EPT_VPID_CAP_ADVEXITINFO_EPT_ MASKUINT64_C(0x0000000000400000)1722 #define VMX_BF_EPT_VPID_CAP_ACCESS_DIRTY_SHIFT 21 1723 #define VMX_BF_EPT_VPID_CAP_ACCESS_DIRTY_MASK UINT64_C(0x0000000000200000) 1724 #define VMX_BF_EPT_VPID_CAP_ADVEXITINFO_EPT_VIOLATION_SHIFT 22 1725 #define VMX_BF_EPT_VPID_CAP_ADVEXITINFO_EPT_VIOLATION_MASK UINT64_C(0x0000000000400000) 1726 1726 #define VMX_BF_EPT_VPID_CAP_SUPER_SHW_STACK_SHIFT 23 1727 1727 #define VMX_BF_EPT_VPID_CAP_SUPER_SHW_STACK_MASK UINT64_C(0x0000000000800000) … … 1749 1749 #define VMX_BF_EPT_VPID_CAP_RSVD_44_63_MASK UINT64_C(0xfffff00000000000) 1750 1750 RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_EPT_VPID_CAP_, UINT64_C(0), UINT64_MAX, 1751 (RWX_X_ONLY, RSVD_1_5, PAGE_WALK_LENGTH_4, RSVD_7, EMT_UC, RSVD_9_13, EMT_WB, RSVD_15, PDE_2M,1752 PDPTE_1G, RSVD_18_19, INVEPT, EPT_ACCESS_DIRTY, ADVEXITINFO_EPT, SUPER_SHW_STACK, RSVD_24,1751 (RWX_X_ONLY, RSVD_1_5, PAGE_WALK_LENGTH_4, RSVD_7, MEMTYPE_UC, RSVD_9_13, MEMTYPE_WB, RSVD_15, PDE_2M, 1752 PDPTE_1G, RSVD_18_19, INVEPT, ACCESS_DIRTY, ADVEXITINFO_EPT_VIOLATION, SUPER_SHW_STACK, RSVD_24, 1753 1753 INVEPT_SINGLE_CTX, INVEPT_ALL_CTX, RSVD_27_31, INVVPID, RSVD_33_39, INVVPID_INDIV_ADDR, 1754 1754 INVVPID_SINGLE_CTX, INVVPID_ALL_CTX, INVVPID_SINGLE_CTX_RETAIN_GLOBALS, RSVD_44_63)); -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r91357 r91358 3337 3337 3338 3338 /* Make sure the write-back cacheable memory type for EPT is supported. */ 3339 if (RT_UNLIKELY(!(g_HmMsrs.u.vmx.u64EptVpidCaps & MSR_IA32_VMX_EPT_VPID_CAP_ EMT_WB)))3339 if (RT_UNLIKELY(!(g_HmMsrs.u.vmx.u64EptVpidCaps & MSR_IA32_VMX_EPT_VPID_CAP_MEMTYPE_WB))) 3340 3340 { 3341 3341 pVM->hmr0.s.vmx.enmTlbFlushEpt = VMXTLBFLUSHEPT_NOT_SUPPORTED; … … 5889 5889 ("EPTP %#RX64\n", pVmcsInfo->HCPhysEPTP)); 5890 5890 AssertMsg( !((pVmcsInfo->HCPhysEPTP >> 6) & 0x01) /* Bit 6 (EPT accessed & dirty bit). */ 5891 || (g_HmMsrs.u.vmx.u64EptVpidCaps & MSR_IA32_VMX_EPT_VPID_CAP_ EPT_ACCESS_DIRTY),5891 || (g_HmMsrs.u.vmx.u64EptVpidCaps & MSR_IA32_VMX_EPT_VPID_CAP_ACCESS_DIRTY), 5892 5892 ("EPTP accessed/dirty bit not supported by CPU but set %#RX64\n", pVmcsInfo->HCPhysEPTP)); 5893 5893 -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r91356 r91358 1462 1462 uint8_t const fExecOnly = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_RWX_X_ONLY); 1463 1463 uint8_t const fPml4 = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_PAGE_WALK_LENGTH_4); 1464 uint8_t const f EptMemUc = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_EMT_UC);1465 uint8_t const f EptMemWb = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_EMT_WB);1464 uint8_t const fMemTypeUc = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_MEMTYPE_UC); 1465 uint8_t const fMemTypeWb = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_MEMTYPE_WB); 1466 1466 uint8_t const f2MPage = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_PDE_2M); 1467 1467 uint8_t const f1GPage = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_PDPTE_1G); 1468 1468 uint8_t const fInvept = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_INVEPT); 1469 uint8_t const f EptAccDirty = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_EPT_ACCESS_DIRTY);1469 uint8_t const fAccessDirty = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_ACCESS_DIRTY); 1470 1470 uint8_t const fEptSingle = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_INVEPT_SINGLE_CTX); 1471 1471 uint8_t const fEptAll = RT_BF_GET(uHostMsr, VMX_BF_EPT_VPID_CAP_INVEPT_ALL_CTX); … … 1476 1476 pGuestVmxMsrs->u64EptVpidCaps = RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_RWX_X_ONLY, fExecOnly) 1477 1477 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_PAGE_WALK_LENGTH_4, fPml4) 1478 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_ EMT_UC, fEptMemUc)1479 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_ EMT_WB, fEptMemWb)1478 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_MEMTYPE_UC, fMemTypeUc) 1479 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_MEMTYPE_WB, fMemTypeWb) 1480 1480 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_PDE_2M, f2MPage) 1481 1481 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_PDPTE_1G, f1GPage) 1482 1482 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_INVEPT, fInvept) 1483 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_ EPT_ACCESS_DIRTY, fEptAccDirty)1484 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_ADVEXITINFO_EPT ,0)1483 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_ACCESS_DIRTY, fAccessDirty) 1484 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_ADVEXITINFO_EPT_VIOLATION, 0) 1485 1485 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_SUPER_SHW_STACK, 0) 1486 1486 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_INVEPT_SINGLE_CTX, fEptSingle) -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r91343 r91358 1399 1399 HMVMX_REPORT_MSR_CAP(fCaps, "PAGE_WALK_LENGTH_4", MSR_IA32_VMX_EPT_VPID_CAP_PAGE_WALK_LENGTH_4); 1400 1400 HMVMX_REPORT_MSR_CAP(fCaps, "PAGE_WALK_LENGTH_5", MSR_IA32_VMX_EPT_VPID_CAP_PAGE_WALK_LENGTH_5); 1401 HMVMX_REPORT_MSR_CAP(fCaps, " EMT_UC", MSR_IA32_VMX_EPT_VPID_CAP_EMT_UC);1402 HMVMX_REPORT_MSR_CAP(fCaps, " EMT_WB", MSR_IA32_VMX_EPT_VPID_CAP_EMT_WB);1401 HMVMX_REPORT_MSR_CAP(fCaps, "MEMTYPE_UC", MSR_IA32_VMX_EPT_VPID_CAP_MEMTYPE_UC); 1402 HMVMX_REPORT_MSR_CAP(fCaps, "MEMTYPE_WB", MSR_IA32_VMX_EPT_VPID_CAP_MEMTYPE_WB); 1403 1403 HMVMX_REPORT_MSR_CAP(fCaps, "PDE_2M", MSR_IA32_VMX_EPT_VPID_CAP_PDE_2M); 1404 1404 HMVMX_REPORT_MSR_CAP(fCaps, "PDPTE_1G", MSR_IA32_VMX_EPT_VPID_CAP_PDPTE_1G); 1405 1405 HMVMX_REPORT_MSR_CAP(fCaps, "INVEPT", MSR_IA32_VMX_EPT_VPID_CAP_INVEPT); 1406 HMVMX_REPORT_MSR_CAP(fCaps, " EPT_ACCESS_DIRTY", MSR_IA32_VMX_EPT_VPID_CAP_EPT_ACCESS_DIRTY);1407 HMVMX_REPORT_MSR_CAP(fCaps, "ADVEXITINFO_EPT ", MSR_IA32_VMX_EPT_VPID_CAP_ADVEXITINFO_EPT);1406 HMVMX_REPORT_MSR_CAP(fCaps, "ACCESS_DIRTY", MSR_IA32_VMX_EPT_VPID_CAP_ACCESS_DIRTY); 1407 HMVMX_REPORT_MSR_CAP(fCaps, "ADVEXITINFO_EPT_VIOLATION", MSR_IA32_VMX_EPT_VPID_CAP_ADVEXITINFO_EPT_VIOLATION); 1408 1408 HMVMX_REPORT_MSR_CAP(fCaps, "SUPER_SHW_STACK", MSR_IA32_VMX_EPT_VPID_CAP_SUPER_SHW_STACK); 1409 1409 HMVMX_REPORT_MSR_CAP(fCaps, "INVEPT_SINGLE_CONTEXT", MSR_IA32_VMX_EPT_VPID_CAP_INVEPT_SINGLE_CONTEXT);
Note:
See TracChangeset
for help on using the changeset viewer.