- Timestamp:
- Oct 21, 2021 3:22:44 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r91634 r91963 5940 5940 5941 5941 /* Check / mask the value. */ 5942 if (uNewCrX & UINT64_C(0xfff0000000000000)) 5943 { 5942 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 5943 /* See Intel spec. 27.2.2 "EPT Translation Mechanism" footnote. */ 5944 uint64_t const fInvPhysMask = !CPUMIsGuestVmxEptPagingEnabledEx(IEM_GET_CTX(pVCpu)) 5945 ? ~(RT_BIT_64(IEM_GET_GUEST_CPU_FEATURES(pVCpu)->cMaxPhysAddrWidth) - 1U) 5946 : (X86_CR3_EPT_PAGE_MASK | X86_PAGE_4K_OFFSET_MASK); 5947 #else 5948 uint64_t const fInvPhysMask = UINT64_C(0xfff0000000000000); 5949 #endif 5950 if (uNewCrX & fInvPhysMask) 5951 { 5952 /** @todo Should we raise this only for 64-bit mode like Intel claims? AMD is 5953 * very vague in this area. As mentioned above, need testcase on real 5954 * hardware... Sigh. */ 5944 5955 Log(("Trying to load CR3 with invalid high bits set: %#llx\n", uNewCrX)); 5945 5956 return iemRaiseGeneralProtectionFault0(pVCpu); … … 5949 5960 if ( (pVCpu->cpum.GstCtx.cr4 & X86_CR4_PAE) 5950 5961 && (pVCpu->cpum.GstCtx.msrEFER & MSR_K6_EFER_LME)) 5962 { 5963 /** @todo Redundant? This value has already been validated above. */ 5951 5964 fValid = UINT64_C(0x000fffffffffffff); 5965 } 5952 5966 else 5953 5967 fValid = UINT64_C(0xffffffff);
Note:
See TracChangeset
for help on using the changeset viewer.