VirtualBox

Changeset 8914 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 19, 2008 12:05:35 PM (17 years ago)
Author:
vboxsync
Message:

Moved cpu id check around for tlb flushing.

File:
1 edited

Legend:

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

    r8901 r8914  
    789789    STAM_PROFILE_ADV_START(&pVM->hwaccm.s.StatInGC, x);
    790790
     791    if (!pVM->hwaccm.s.svm.fResumeVM)
     792    {
     793        if (pVM->hwaccm.s.svm.idLastCpu != pCpu->idCpu)
     794        {
     795            /* Force a TLB flush on VM entry. */
     796            pVM->hwaccm.s.svm.fForceTLBFlush = true;
     797        }
     798        pVM->hwaccm.s.svm.idLastCpu = pCpu->idCpu;
     799    }
     800
    791801    /* Make sure we flush the TLB when required. */
    792802    if (    pVM->hwaccm.s.svm.fForceTLBFlush
     
    802812    }
    803813    else
    804     {
    805814        pVMCB->ctrl.TLBCtrl.n.u1TLBFlush = pVM->hwaccm.s.svm.fForceTLBFlush;
    806     }
    807815
    808816    AssertMsg(pCpu->uCurrentASID >= 1 && pCpu->uCurrentASID < pVM->hwaccm.s.svm.u32MaxASID, ("cpu%d uCurrentASID = %x\n", pCpu->idCpu, pCpu->uCurrentASID));
     
    11411149#ifdef VBOX_STRICT
    11421150            if (rc != VINF_EM_RAW_EMULATE_INSTR)
    1143                 Log(("PGMTrap0eHandler failed with %d\n", rc));
     1151                LogFlow(("PGMTrap0eHandler failed with %d\n", rc));
    11441152#endif
    11451153            /* Need to go back to the recompiler to emulate the instruction. */
     
    12071215                break;
    12081216            }
    1209             Log(("Trap %x at %VGv\n", vector, pCtx->eip));
     1217            Log(("Trap %x at %VGv esi=%x\n", vector, pCtx->eip, pCtx->esi));
    12101218            SVMR0InjectEvent(pVM, pVMCB, pCtx, &Event);
    12111219
     
    16511659
    16521660    LogFlow(("SVMR0Enter cpu%d last=%d asid=%d\n", pCpu->idCpu, pVM->hwaccm.s.svm.idLastCpu, pCpu->uCurrentASID));
    1653     if (pVM->hwaccm.s.svm.idLastCpu != pCpu->idCpu)
    1654     {
    1655         /* Force a TLB flush on VM entry. */
    1656         pVM->hwaccm.s.svm.fForceTLBFlush = true;
    1657     }
    1658     pVM->hwaccm.s.svm.idLastCpu = pCpu->idCpu;
    1659 
    16601661    pVM->hwaccm.s.svm.fResumeVM = false;
    16611662
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