Changeset 76550 in vbox
- Timestamp:
- Dec 31, 2018 4:15:57 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r76493 r76550 1422 1422 1423 1423 /* CR0 Fixed-0. */ 1424 pGuestVmxMsrs->u64Cr0Fixed0 = pGuestFeatures->fVmxUnrestrictedGuest ? VMX_V_CR0_FIXED0_UX: 1424 pGuestVmxMsrs->u64Cr0Fixed0 = pGuestFeatures->fVmxUnrestrictedGuest ? VMX_V_CR0_FIXED0_UX: VMX_V_CR0_FIXED0; 1425 1425 1426 1426 /* CR0 Fixed-1. */ 1427 1427 { 1428 uint64_t const uHostMsr = fIsNstGstHwExecAllowed ? pHostVmxMsrs->u64Cr0Fixed1 : 0; 1428 /* 1429 * All CPUs I've looked at so far report CR0 fixed-1 bits as 0xffffffff. 1430 * This is different from CR4 fixed-1 bits which are reported as per the 1431 * CPU features and/or micro-architecture/generation. Why? Ask Intel. 1432 */ 1433 uint64_t const uHostMsr = fIsNstGstHwExecAllowed ? pHostVmxMsrs->u64Cr0Fixed1 : 0xffffffff; 1429 1434 pGuestVmxMsrs->u64Cr0Fixed1 = uHostMsr | VMX_V_CR0_FIXED0; /* Make sure the CR0 MB1 bits are not clear. */ 1430 1435 } … … 1435 1440 /* CR4 Fixed-1. */ 1436 1441 { 1437 uint64_t const uHostMsr = fIsNstGstHwExecAllowed ? pHostVmxMsrs->u64Cr4Fixed1 : 0;1442 uint64_t const uHostMsr = fIsNstGstHwExecAllowed ? pHostVmxMsrs->u64Cr4Fixed1 : CPUMGetGuestCR4ValidMask(pVM); 1438 1443 pGuestVmxMsrs->u64Cr4Fixed1 = uHostMsr | VMX_V_CR4_FIXED0; /* Make sure the CR4 MB1 bits are not clear. */ 1439 1444 } -
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r76464 r76550 4462 4462 * 4463 4463 * This needs to be done -after- exploding guest features and sanitizing CPUID leaves 4464 * as constructing VMX capabilities MSRs rely on CPU feature bits such aslong mode,4465 * unrestricted executionand possibly more in the future.4464 * as constructing VMX capabilities MSRs rely on CPU feature bits like long mode, 4465 * unrestricted-guest execution, CR4 feature bits and possibly more in the future. 4466 4466 */ 4467 4467 if (pVM->cpum.s.GuestFeatures.fVmx)
Note:
See TracChangeset
for help on using the changeset viewer.