Changeset 70056 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Dec 11, 2017 2:40:02 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 119598
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r69216 r70056 184 184 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 185 185 *puValue = TMCpuTickGet(pVCpu); 186 #ifdef VBOX_WITH_NESTED_HWVIRT 187 *puValue = CPUMApplyNestedGuestTscOffset(pVCpu, *puValue); 188 #endif 186 189 return VINF_SUCCESS; 187 190 } … … 342 345 * what we want? */ 343 346 *puValue = TMCpuTickGet(pVCpu); 347 #ifdef VBOX_WITH_NESTED_HWVIRT 348 *puValue = CPUMApplyNestedGuestTscOffset(pVCpu, *puValue); 349 #endif 344 350 return VINF_SUCCESS; 345 351 } … … 362 368 * what we want? */ 363 369 *puValue = TMCpuTickGet(pVCpu); 370 #ifdef VBOX_WITH_NESTED_HWVIRT 371 *puValue = CPUMApplyNestedGuestTscOffset(pVCpu, *puValue); 372 #endif 364 373 return VINF_SUCCESS; 365 374 } -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r70000 r70056 2695 2695 } 2696 2696 2697 2698 /** 2699 * Applies the TSC offset of a nested-guest if any and returns the new TSC 2700 * value for the guest. 2701 * 2702 * @returns The TSC offset after applying any nested-guest TSC offset. 2703 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 2704 * @param uTicks The guest TSC. 2705 */ 2706 VMM_INT_DECL(uint64_t) CPUMApplyNestedGuestTscOffset(PVMCPU pVCpu, uint64_t uTicks) 2707 { 2708 #ifndef IN_RC 2709 PCCPUMCTX pCtx = &pVCpu->cpum.s.Guest; 2710 if (CPUMIsGuestInSvmNestedHwVirtMode(pCtx)) 2711 { 2712 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 2713 return uTicks + pVmcb->ctrl.u64TSCOffset; 2714 } 2715 2716 /** @todo Intel. */ 2717 #else 2718 RT_NOREF(pVCpu); 2719 #endif 2720 return uTicks; 2721 } 2722 -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r69111 r70056 1315 1315 1316 1316 uint64_t uTicks = TMCpuTickGet(pVCpu); 1317 #ifdef VBOX_WITH_NESTED_HWVIRT 1318 uTicks = CPUMApplyNestedGuestTscOffset(pVCpu, uTicks); 1319 #endif 1317 1320 1318 1321 /* Same behaviour in 32 & 64 bits mode */ … … 1351 1354 1352 1355 uint64_t uTicks = TMCpuTickGet(pVCpu); 1356 #ifdef VBOX_WITH_NESTED_HWVIRT 1357 uTicks = CPUMApplyNestedGuestTscOffset(pVCpu, uTicks); 1358 #endif 1353 1359 1354 1360 /* Same behaviour in 32 & 64 bits mode */ -
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r70020 r70056 366 366 pVmcbNstGstCtrl->u64IOPMPhysAddr = pNstGstVmcbCache->u64IOPMPhysAddr; 367 367 pVmcbNstGstCtrl->u64MSRPMPhysAddr = pNstGstVmcbCache->u64MSRPMPhysAddr; 368 pVmcbNstGstCtrl->u64TSCOffset = pNstGstVmcbCache->u64TSCOffset; 368 369 pVmcbNstGstCtrl->IntCtrl.n.u1VIntrMasking = pNstGstVmcbCache->fVIntrMasking; 369 370 pVmcbNstGstCtrl->TLBCtrl = pNstGstVmcbCache->TLBCtrl;
Note:
See TracChangeset
for help on using the changeset viewer.