VirtualBox

Changeset 51661 in vbox


Ignore:
Timestamp:
Jun 19, 2014 9:17:25 AM (11 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Use VMCS offsetting until we fix TM, makes Hyper-V guests more stable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r51643 r51661  
    55855585        fOffsettedTsc = TMCpuTickCanUseRealTSC(pVCpu, &pVCpu->hm.s.vmx.u64TSCOffset, &fParavirtTsc);
    55865586
     5587#if 0
    55875588    if (fParavirtTsc)
    55885589    {
     
    55975598        Assert(u64CurTsc + pVCpu->hm.s.vmx.u64TSCOffset >= u64LastTick);
    55985599        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);
    56125613    if (fOffsettedTsc)
    56135614    {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette