VirtualBox

Changeset 10489 in vbox for trunk


Ignore:
Timestamp:
Jul 11, 2008 7:17:00 AM (16 years ago)
Author:
vboxsync
Message:

AMD-V: Always flush the TLB the first time a cpu is used.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r10465 r10489  
    138138    /* TLB flush count */
    139139    uint32_t    cTLBFlushes;
     140
     141    /* Set the first time a cpu is used to make sure we start with a clean TLB. */
     142    bool        fFlushTLB;
    140143
    141144    bool        fConfigured;
  • trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp

    r10465 r10489  
    574574    Assert(idCpu < RT_ELEMENTS(HWACCMR0Globals.aCpuInfo));
    575575
    576     pCpu->idCpu = idCpu;
     576    pCpu->idCpu     = idCpu;
     577
     578    /* Make sure we start with a clean TLB. */
     579    pCpu->fFlushTLB = true;
    577580
    578581    /* Should never happen */
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r10480 r10489  
    894894        && !pVM->hwaccm.s.svm.fAlwaysFlushTLB)
    895895    {
    896         if (++pCpu->uCurrentASID >= pVM->hwaccm.s.svm.u32MaxASID)
    897         {
     896        if (    ++pCpu->uCurrentASID >= pVM->hwaccm.s.svm.u32MaxASID
     897            ||  pCpu->fFlushTLB)
     898        {
     899            pCpu->fFlushTLB                  = false;
    898900            pCpu->uCurrentASID               = 1;       /* start at 1; host uses 0 */
    899901            pVMCB->ctrl.TLBCtrl.n.u1TLBFlush = 1;       /* wrap around; flush TLB */
     
    907909    else
    908910    {
     911        Assert(!pCpu->fFlushTLB || pVM->hwaccm.s.svm.fAlwaysFlushTLB);
     912
    909913        /* We never increase uCurrentASID in the fAlwaysFlushTLB (erratum 170) case. */
    910914        if (!pCpu->uCurrentASID)
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