Changeset 72636 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jun 21, 2018 10:47:43 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123139
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r72623 r72636 6255 6255 { 6256 6256 HMSVM_VALIDATE_EXIT_HANDLER_PARAMS(); 6257 #if 1 /** @todo Needs testing. @bugref{6973} */6258 6257 VBOXSTRICTRC rcStrict = IEMExecDecodedRdtsc(pVCpu, hmR0SvmGetInstrLengthHwAssist(pVCpu, pCtx, 2)); 6259 6258 if (rcStrict == VINF_SUCCESS) 6260 6259 pSvmTransient->fUpdateTscOffsetting = true; 6261 else if (rcStrict == VINF_ EM_RESCHEDULE)6260 else if (rcStrict == VINF_IEM_RAISED_XCPT) 6262 6261 rcStrict = VINF_SUCCESS; 6263 6262 HMSVM_CHECK_SINGLE_STEP(pVCpu, rcStrict); 6264 6263 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtsc); 6265 6264 return VBOXSTRICTRC_TODO(rcStrict); 6266 #else6267 int rc = EMInterpretRdtsc(pVCpu->CTX_SUFF(pVM), pVCpu, CPUMCTX2CORE(pCtx));6268 if (RT_LIKELY(rc == VINF_SUCCESS))6269 {6270 pSvmTransient->fUpdateTscOffsetting = true;6271 hmR0SvmAdvanceRipHwAssist(pVCpu, pCtx, 2);6272 HMSVM_CHECK_SINGLE_STEP(pVCpu, rc);6273 }6274 else6275 {6276 AssertMsgFailed(("hmR0SvmExitRdtsc: EMInterpretRdtsc failed with %Rrc\n", rc));6277 rc = VERR_EM_INTERPRETER;6278 }6279 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtsc);6280 return rc;6281 #endif6282 6265 } 6283 6266 … … 6289 6272 { 6290 6273 HMSVM_VALIDATE_EXIT_HANDLER_PARAMS(); 6291 #if 1 /** @todo Needs testing. @bugref{6973} */6292 6274 VBOXSTRICTRC rcStrict = IEMExecDecodedRdtscp(pVCpu, hmR0SvmGetInstrLengthHwAssist(pVCpu, pCtx, 3)); 6293 6275 if (rcStrict == VINF_SUCCESS) 6294 6276 pSvmTransient->fUpdateTscOffsetting = true; 6295 else if (rcStrict == VINF_ EM_RESCHEDULE)6277 else if (rcStrict == VINF_IEM_RAISED_XCPT) 6296 6278 rcStrict = VINF_SUCCESS; 6297 6279 HMSVM_CHECK_SINGLE_STEP(pVCpu, rcStrict); 6298 6280 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtscp); 6299 6281 return VBOXSTRICTRC_TODO(rcStrict); 6300 #else6301 int rc = EMInterpretRdtscp(pVCpu->CTX_SUFF(pVM), pVCpu, pCtx);6302 if (RT_LIKELY(rc == VINF_SUCCESS))6303 {6304 pSvmTransient->fUpdateTscOffsetting = true;6305 hmR0SvmAdvanceRipHwAssist(pVCpu, pCtx, 3);6306 HMSVM_CHECK_SINGLE_STEP(pVCpu, rc);6307 }6308 else6309 {6310 AssertMsgFailed(("hmR0SvmExitRdtsc: EMInterpretRdtscp failed with %Rrc\n", rc));6311 rc = VERR_EM_INTERPRETER;6312 }6313 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtscp);6314 return rc;6315 #endif6316 6282 } 6317 6283 -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r72620 r72636 11917 11917 { 11918 11918 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(); 11919 #if 1 /** @todo Needs testing. @bugref{6973} */11920 11919 int rc = hmR0VmxSaveGuestCR4(pVCpu, pMixedCtx); /* Needed for CPL < 0 only, really. */ 11921 11920 rc |= hmR0VmxSaveGuestRegsForIemExec(pVCpu, pMixedCtx, false /*fMemory*/, false /*fNeedRsp*/); … … 11934 11933 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtsc); 11935 11934 return rcStrict; 11936 #else11937 int rc = hmR0VmxSaveGuestCR4(pVCpu, pMixedCtx);11938 AssertRCReturn(rc, rc);11939 11940 PVM pVM = pVCpu->CTX_SUFF(pVM);11941 rc = EMInterpretRdtsc(pVM, pVCpu, CPUMCTX2CORE(pMixedCtx));11942 if (RT_LIKELY(rc == VINF_SUCCESS))11943 {11944 rc = hmR0VmxAdvanceGuestRip(pVCpu, pMixedCtx, pVmxTransient);11945 Assert(pVmxTransient->cbInstr == 2);11946 /* If we get a spurious VM-exit when offsetting is enabled, we must reset offsetting on VM-reentry. See @bugref{6634}. */11947 if (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_TSC_OFFSETTING)11948 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true;11949 }11950 else11951 rc = VERR_EM_INTERPRETER;11952 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtsc);11953 return rc;11954 #endif11955 11935 } 11956 11936 … … 11962 11942 { 11963 11943 HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(); 11964 #if 1 /** @todo Needs testing. @bugref{6973} */11965 11944 int rc = hmR0VmxSaveGuestCR4(pVCpu, pMixedCtx); /* Needed for CPL < 0 only, really. */ 11966 11945 rc |= hmR0VmxSaveGuestRegsForIemExec(pVCpu, pMixedCtx, false /*fMemory*/, false /*fNeedRsp*/); … … 11980 11959 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtscp); 11981 11960 return rcStrict; 11982 #else11983 int rc = hmR0VmxSaveGuestCR4(pVCpu, pMixedCtx);11984 rc |= hmR0VmxSaveGuestAutoLoadStoreMsrs(pVCpu, pMixedCtx); /* For MSR_K8_TSC_AUX */11985 AssertRCReturn(rc, rc);11986 11987 PVM pVM = pVCpu->CTX_SUFF(pVM);11988 rc = EMInterpretRdtscp(pVM, pVCpu, pMixedCtx);11989 if (RT_SUCCESS(rc))11990 {11991 rc = hmR0VmxAdvanceGuestRip(pVCpu, pMixedCtx, pVmxTransient);11992 Assert(pVmxTransient->cbInstr == 3);11993 /* If we get a spurious VM-exit when offsetting is enabled, we must reset offsetting on VM-reentry. See @bugref{6634}. */11994 if (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_TSC_OFFSETTING)11995 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true;11996 }11997 else11998 {11999 AssertMsgFailed(("hmR0VmxExitRdtscp: EMInterpretRdtscp failed with %Rrc\n", rc));12000 rc = VERR_EM_INTERPRETER;12001 }12002 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitRdtscp);12003 return rc;12004 #endif12005 11961 } 12006 11962
Note:
See TracChangeset
for help on using the changeset viewer.