Changeset 92541 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Nov 22, 2021 6:35:38 AM (3 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r91985 r92541 3045 3045 } 3046 3046 3047 3048 /** 3049 * Checks whether the guest is in VMX non-root mode and using EPT paging and the 3050 * nested-guest is in PAE mode. 3051 * 3052 * @returns @c true if in VMX non-root operation with EPT, @c false otherwise. 3053 * @param pVCpu The cross context virtual CPU structure. 3054 */ 3055 VMM_INT_DECL(bool) CPUMIsGuestVmxEptPaePagingEnabled(PCVMCPUCC pVCpu) 3056 { 3057 return CPUMIsGuestVmxEptPagingEnabledEx(&pVCpu->cpum.s.Guest) 3058 && CPUMIsGuestInPAEModeEx(&pVCpu->cpum.s.Guest); 3059 } 3060 -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r91997 r92541 3922 3922 /* ignore informational status codes */ 3923 3923 } 3924 rcStrict = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER); 3924 rcStrict = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER, 3925 false /* fForce */); 3925 3926 3926 3927 /* TR selector is at offset 0x16. */ … … 5894 5895 Assert(pVCpu->cpum.GstCtx.cr0 == uNewCrX); 5895 5896 5896 rcStrict = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER); 5897 rcStrict = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER, 5898 false /* fForce */); 5897 5899 break; 5898 5900 } … … 6097 6099 Assert(pVCpu->cpum.GstCtx.cr4 == uNewCrX); 6098 6100 6099 rcStrict = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER); 6101 rcStrict = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER, 6102 false /* fForce */); 6100 6103 break; 6101 6104 } -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h
r92493 r92541 92 92 * see comment in iemMemPageTranslateAndCheckAccess(). 93 93 */ 94 int rc = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0 | X86_CR0_PE, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER); 94 int rc = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0 | X86_CR0_PE, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER, 95 true /* fForce */); 95 96 AssertRCReturn(rc, rc); 96 97 -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r92493 r92541 1226 1226 * see comment in iemMemPageTranslateAndCheckAccess(). 1227 1227 */ 1228 int rc = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0 | X86_CR0_PE, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER); 1228 int rc = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0 | X86_CR0_PE, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER, 1229 true /* fForce */); 1229 1230 AssertRCReturn(rc, rc); 1230 1231 -
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r92495 r92541 1110 1110 if (fMaybeChangedMode) 1111 1111 { 1112 int rc = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER); 1112 int rc = PGMChangeMode(pVCpu, pVCpu->cpum.GstCtx.cr0, pVCpu->cpum.GstCtx.cr4, pVCpu->cpum.GstCtx.msrEFER, 1113 false /* fForce */); 1113 1114 AssertMsgReturn(rc == VINF_SUCCESS, ("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_NEM_IPE_1); 1114 1115 } -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r92493 r92541 1822 1822 PPGMPTWALK pWalk, PPGMPTWALKGST pGstWalk) 1823 1823 { 1824 /* SLAT mode must be valid at this point as this should only be used -after- we have determined SLAT mode. */ 1824 1825 Assert( pVCpu->pgm.s.enmGuestSlatMode != PGMSLAT_DIRECT 1825 1826 && pVCpu->pgm.s.enmGuestSlatMode != PGMSLAT_INVALID); … … 2713 2714 2714 2715 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 2715 if ( CPUMIsGuestVmxEptPagingEnabled(pVCpu) 2716 && CPUMIsGuestInPAEMode(pVCpu)) 2716 if (CPUMIsGuestVmxEptPaePagingEnabled(pVCpu)) 2717 2717 { 2718 2718 PGMPTWALK Walk; … … 2787 2787 * @param cr4 The new cr4. 2788 2788 * @param efer The new extended feature enable register. 2789 */ 2790 VMMDECL(int) PGMChangeMode(PVMCPUCC pVCpu, uint64_t cr0, uint64_t cr4, uint64_t efer) 2789 * @param fForce Whether to force a mode change. 2790 */ 2791 VMMDECL(int) PGMChangeMode(PVMCPUCC pVCpu, uint64_t cr0, uint64_t cr4, uint64_t efer, bool fForce) 2791 2792 { 2792 2793 VMCPU_ASSERT_EMT(pVCpu); … … 2832 2833 * Did it change? 2833 2834 */ 2834 if (pVCpu->pgm.s.enmGuestMode == enmGuestMode) 2835 if ( !fForce 2836 && pVCpu->pgm.s.enmGuestMode == enmGuestMode) 2835 2837 return VINF_SUCCESS; 2836 2838 … … 3753 3755 PVMCC pVM = pVCpu->CTX_SUFF(pVM); 3754 3756 PGM_LOCK_VOID(pVM); 3755 if (pVCpu->pgm.s.uEptPtr != uEptPtr) 3756 { 3757 pVCpu->pgm.s.uEptPtr = uEptPtr; 3758 pVCpu->pgm.s.pGstEptPml4R0 = NIL_RTR0PTR; 3759 pVCpu->pgm.s.pGstEptPml4R3 = NIL_RTR3PTR; 3760 } 3757 pVCpu->pgm.s.uEptPtr = uEptPtr; 3761 3758 PGM_UNLOCK(pVM); 3762 3759 } -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r92426 r92541 4152 4152 #endif 4153 4153 { 4154 /** @todo Nested VMX: convert GCPhysCR3 from nested-guest physical to guest-physical 4155 * by calling SLAT phys walk. */ 4156 4154 4157 /* 4155 4158 * Map the page CR3 points at. … … 4306 4309 4307 4310 /* 4311 * Update second-level address translation info. 4312 */ 4313 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 4314 pVCpu->pgm.s.pGstEptPml4R3 = 0; 4315 pVCpu->pgm.s.pGstEptPml4R0 = 0; 4316 #endif 4317 4318 /* 4308 4319 * Update shadow paging info. 4309 4320 */ -
trunk/src/VBox/VMM/VMMAll/PGMAllGstSlatEpt.cpp.h
r92481 r92541 97 97 * See Intel spec. Table 26-7 "Exit Qualification for EPT Violations". 98 98 * 99 * - X_USER is Cumulative but relevant only when mode-based execute control for EPT99 * - X_USER is cumulative but relevant only when mode-based execute control for EPT 100 100 * which we currently don't support it (asserted below). 101 101 *
Note:
See TracChangeset
for help on using the changeset viewer.