VirtualBox

Changeset 10509 in vbox for trunk/src/VBox


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

And again

File:
1 edited

Legend:

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

    r10508 r10509  
    774774    unsigned    cResume = 0;
    775775    uint8_t     u8LastVTPR;
     776    PHWACCM_CPUINFO pCpu = 0;
    776777
    777778    STAM_PROFILE_ADV_START(&pVM->hwaccm.s.StatEntry, x);
     
    873874
    874875#ifdef LOG_ENABLED
    875     {
    876         PHWACCM_CPUINFO pCpuTemp = HWACCMR0GetCurrentCpu();
    877         if (    pVM->hwaccm.s.svm.idLastCpu != pCpuTemp->idCpu
    878             ||  pVM->hwaccm.s.svm.cTLBFlushes != pCpuTemp->cTLBFlushes)
    879         {
    880             if (pVM->hwaccm.s.svm.idLastCpu != pCpuTemp->idCpu)
    881                 Log(("Force TLB flush due to rescheduling to a different cpu (%d vs %d)\n", pVM->hwaccm.s.svm.idLastCpu, pCpuTemp->idCpu));
    882             else
    883                 Log(("Force TLB flush due to changed TLB flush count (%x vs %x)\n", pVM->hwaccm.s.svm.cTLBFlushes, pCpuTemp->cTLBFlushes));
    884         }
    885         if (pCpuTemp->fFlushTLB)
    886             Log(("Force TLB flush: first time cpu %d is used -> flush\n", pCpuTemp->idCpu));
    887     }
     876    pCpu = HWACCMR0GetCurrentCpu();
     877    if (    pVM->hwaccm.s.svm.idLastCpu != pCpu->idCpu
     878        ||  pVM->hwaccm.s.svm.cTLBFlushes != pCpu->cTLBFlushes)
     879    {
     880        if (pVM->hwaccm.s.svm.idLastCpu != pCpu->idCpu)
     881            Log(("Force TLB flush due to rescheduling to a different cpu (%d vs %d)\n", pVM->hwaccm.s.svm.idLastCpu, pCpu->idCpu));
     882        else
     883            Log(("Force TLB flush due to changed TLB flush count (%x vs %x)\n", pVM->hwaccm.s.svm.cTLBFlushes, pCpu->cTLBFlushes));
     884    }
     885    if (pCpu->fFlushTLB)
     886        Log(("Force TLB flush: first time cpu %d is used -> flush\n", pCpu->idCpu));
    888887#endif
    889888
     
    892891     *       (until the actual world switch)
    893892     */
    894     PHWACCM_CPUINFO pCpu = HWACCMR0GetCurrentCpu();
     893    pCpu = HWACCMR0GetCurrentCpu();
    895894    /* Force a TLB flush for the first world switch if the current cpu differs from the one we ran on last. */
    896895    /* Note that this can happen both for start and resume due to long jumps back to ring 3. */
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