Changeset 78526 in vbox
- Timestamp:
- May 15, 2019 4:58:06 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r76993 r78526 1428 1428 { 1429 1429 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1430 *puValue = 0;1430 *puValue = pVCpu->cpum.s.Guest.hwvirt.vmx.Msrs.u64EptVpidCaps; 1431 1431 return VINF_SUCCESS; 1432 1432 } -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r78220 r78526 1525 1525 * - True VM-entry VM-execution controls. 1526 1526 * - True VM-exit VM-execution controls. 1527 * - EPT/VPID capabilities.1528 1527 */ 1529 1528 … … 1690 1689 /* VMCS Enumeration. */ 1691 1690 pGuestVmxMsrs->u64VmcsEnum = VMX_V_VMCS_MAX_INDEX << VMX_BF_VMCS_ENUM_HIGHEST_IDX_SHIFT; 1691 1692 /* VPID and EPT Capabilities. */ 1693 { 1694 /* 1695 * INVVPID instruction always causes a VM-exit unconditionally, so we are free to fake 1696 * and emulate any INVVPID flush type. However, it only makes sense to expose the types 1697 * when INVVPID instruction is supported just to be more compatible with guest 1698 * hypervisors that may make assumptions by only looking at this MSR even though they 1699 * are technically supposed to refer to bit 37 of MSR_IA32_VMX_PROC_CTLS2 first. 1700 * 1701 * See Intel spec. 25.1.2 "Instructions That Cause VM Exits Unconditionally". 1702 * See Intel spec. 30.3 "VMX Instructions". 1703 */ 1704 uint8_t const fVpid = pGuestFeatures->fVmxVpid; 1705 pGuestVmxMsrs->u64EptVpidCaps = RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_INVVPID, fVpid) 1706 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_INVVPID_SINGLE_CTX, fVpid & 1) 1707 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_INVVPID_ALL_CTX, fVpid & 1) 1708 | RT_BF_MAKE(VMX_BF_EPT_VPID_CAP_INVVPID_SINGLE_CTX_RETAIN_GLOBALS, fVpid & 1); 1709 } 1692 1710 1693 1711 /* VM Functions. */ … … 1845 1863 EmuFeat.fVmxRdtscp = 1; 1846 1864 EmuFeat.fVmxVirtX2ApicMode = 0; 1847 EmuFeat.fVmxVpid = 0; 1865 EmuFeat.fVmxVpid = 0; /** @todo NSTVMX: enable this. */ 1848 1866 EmuFeat.fVmxWbinvdExit = 1; 1849 1867 EmuFeat.fVmxUnrestrictedGuest = 0;
Note:
See TracChangeset
for help on using the changeset viewer.