Changeset 51661 in vbox
- Timestamp:
- Jun 19, 2014 9:17:25 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r51643 r51661 5585 5585 fOffsettedTsc = TMCpuTickCanUseRealTSC(pVCpu, &pVCpu->hm.s.vmx.u64TSCOffset, &fParavirtTsc); 5586 5586 5587 #if 0 5587 5588 if (fParavirtTsc) 5588 5589 { … … 5597 5598 Assert(u64CurTsc + pVCpu->hm.s.vmx.u64TSCOffset >= u64LastTick); 5598 5599 rc = GIMR0UpdateParavirtTsc(pVM, pVCpu->hm.s.vmx.u64TSCOffset); 5599 if (RT_SUCCESS(rc))5600 {5601 /* Note: VMX_VMCS_CTRL_PROC_EXEC_RDTSC_EXIT takes precedence over TSC_OFFSET, applies to RDTSCP too. */5602 rc = VMXWriteVmcs64(VMX_VMCS64_CTRL_TSC_OFFSET_FULL, 0); AssertRC(rc); 5603 5604 pVCpu->hm.s.vmx.u32ProcCtls &= ~VMX_VMCS_CTRL_PROC_EXEC_RDTSC_EXIT;5605 rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_PROC_EXEC, pVCpu->hm.s.vmx.u32ProcCtls); AssertRC(rc);5606 STAM_COUNTER_INC(&pVCpu->hm.s.StatTscParavirt);5607 return;5608 } 5609 /* else: Shouldn't really fail. If it does, fallback to offsetted TSC mode. */ 5610 }5611 5600 AssertRC(rc); 5601 /* Note: VMX_VMCS_CTRL_PROC_EXEC_RDTSC_EXIT takes precedence over TSC_OFFSET, applies to RDTSCP too. */ 5602 rc = VMXWriteVmcs64(VMX_VMCS64_CTRL_TSC_OFFSET_FULL, 0); AssertRC(rc); 5603 5604 pVCpu->hm.s.vmx.u32ProcCtls &= ~VMX_VMCS_CTRL_PROC_EXEC_RDTSC_EXIT; 5605 rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_PROC_EXEC, pVCpu->hm.s.vmx.u32ProcCtls); AssertRC(rc); 5606 STAM_COUNTER_INC(&pVCpu->hm.s.StatTscParavirt); 5607 } 5608 else 5609 #endif 5610 5611 if (fParavirtTsc) 5612 STAM_COUNTER_INC(&pVCpu->hm.s.StatTscParavirt); 5612 5613 if (fOffsettedTsc) 5613 5614 {
Note:
See TracChangeset
for help on using the changeset viewer.