- Timestamp:
- Oct 25, 2021 10:34:48 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r91839 r92023 8050 8050 * 8051 8051 * The longjmp exit path can't check these CR3 force-flags and call code that takes a lock again. We cover for it here. 8052 * /8053 if (VMMRZCallRing3IsEnabled(pVCpu))8054 {8055 if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_HM_UPDATE_CR3))8056 {8057 Assert(!(ASMAtomicUoReadU64(&pCtx->fExtrn) & CPUMCTX_EXTRN_CR3));8058 PGMUpdateCR3(pVCpu, CPUMGetGuestCR3(pVCpu), false /* fPdpesMapped */);8059 Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_HM_UPDATE_CR3));8060 }8052 * 8053 * The force-flag is checked first as it's cheaper for potential superfluous calls to this function. 8054 */ 8055 if ( VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_HM_UPDATE_CR3) 8056 && VMMRZCallRing3IsEnabled(pVCpu)) 8057 { 8058 Assert(!(ASMAtomicUoReadU64(&pCtx->fExtrn) & CPUMCTX_EXTRN_CR3)); 8059 PGMUpdateCR3(pVCpu, CPUMGetGuestCR3(pVCpu), false /* fPdpesMapped */); 8060 Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_HM_UPDATE_CR3)); 8061 8061 } 8062 8062 … … 13936 13936 * VM-exit helper for MOV to CRx (CRx write). 13937 13937 */ 13938 static VBOXSTRICTRC hmR0VmxExitMovToCrX(PVMCPUCC pVCpu, PVMXVMCSINFO pVmcsInfo, uint8_t cbInstr, uint8_t iGReg, uint8_t iCrReg) 13939 { 13940 int rc = hmR0VmxImportGuestState(pVCpu, pVmcsInfo, IEM_CPUMCTX_EXTRN_MUST_MASK); 13941 AssertRCReturn(rc, rc); 13938 static VBOXSTRICTRC hmR0VmxExitMovToCrX(PVMCPUCC pVCpu, uint8_t cbInstr, uint8_t iGReg, uint8_t iCrReg) 13939 { 13940 HMVMX_CPUMCTX_ASSERT(pVCpu, IEM_CPUMCTX_EXTRN_MUST_MASK); 13942 13941 13943 13942 VBOXSTRICTRC rcStrict = IEMExecDecodedMovCRxWrite(pVCpu, cbInstr, iCrReg, iGReg); … … 15669 15668 || !(pVmcsInfo->u32ProcCtls & VMX_PROC_CTLS_USE_TPR_SHADOW)); 15670 15669 15671 rcStrict = hmR0VmxExitMovToCrX(pVCpu, pVm csInfo, pVmxTransient->cbExitInstr, iGReg, iCrReg);15670 rcStrict = hmR0VmxExitMovToCrX(pVCpu, pVmxTransient->cbExitInstr, iGReg, iCrReg); 15672 15671 AssertMsg( rcStrict == VINF_SUCCESS 15673 15672 || rcStrict == VINF_PGM_SYNC_CR3, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict))); … … 17137 17136 } 17138 17137 else 17139 rcStrict = hmR0VmxExitMovToCrX(pVCpu, pVmxTransient->pVmcsInfo, pVmxTransient->cbExitInstr, iGReg, iCrReg); 17138 { 17139 int const rc = hmR0VmxImportGuestState(pVCpu, pVmxTransient->pVmcsInfo, IEM_CPUMCTX_EXTRN_MUST_MASK); 17140 AssertRCReturn(rc, rc); 17141 rcStrict = hmR0VmxExitMovToCrX(pVCpu, pVmxTransient->cbExitInstr, iGReg, iCrReg); 17142 } 17140 17143 break; 17141 17144 }
Note:
See TracChangeset
for help on using the changeset viewer.