VirtualBox

Ignore:
Timestamp:
Apr 29, 2013 3:31:20 PM (12 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Update TSC offsetting when the guest write TSC. This fixes the Windows 7 guest BSODs and hangs.

Fixes also re-updating TSC offsetting when we get rescheduled to another CPU due to a longjmp.

File:
1 edited

Legend:

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

    r45786 r45820  
    65396539        pVmxTransient->u8GuestTpr = pVCpu->hm.s.vmx.pbVirtApic[0x80];
    65406540
     6541    if (   pVmxTransient->fUpdateTscOffsettingAndPreemptTimer
     6542        || HMR0GetCurrentCpu()->idCpu != pVCpu->hm.s.idLastCpu)
     6543    {
     6544        hmR0VmxUpdateTscOffsettingAndPreemptTimer(pVCpu, pMixedCtx);
     6545        pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = false;
     6546    }
     6547
    65416548    ASMAtomicWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, true);    /* Used for TLB-shootdowns, set this across the world switch. */
    65426549    hmR0VmxFlushTaggedTlb(pVCpu);                               /* Invalidate the appropriate guest entries from the TLB. */
    6543 
    6544     if (pVmxTransient->fUpdateTscOffsettingAndPreemptTimer)
    6545     {
    6546         hmR0VmxUpdateTscOffsettingAndPreemptTimer(pVCpu, pMixedCtx);
    6547         pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = false;
    6548     }
     6550    Assert(HMR0GetCurrentCpu()->idCpu == pVCpu->hm.s.idLastCpu);
    65496551
    65506552    /*
     
    76407642            pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_VMX_GUEST_AUTO_MSRS;
    76417643        }
     7644        else if (pMixedCtx->ecx == MSR_IA32_TSC)        /* Windows 7 does this during bootup. See @bugref{6398}. */
     7645            pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true;
    76427646
    76437647        /* Update MSRs that are part of the VMCS when MSR-bitmaps are not supported. */
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