VirtualBox

Changeset 37702 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jun 30, 2011 10:09:59 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72562
Message:

REM/VMM: Don't flush the TLB if you don't hold the EM/REM lock, some other EMT may be executing code in the recompiler and could be really surprised by a TLB flush.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r36315 r37702  
    31363136VMMDECL(bool) EMRemIsLockOwner(PVM pVM)
    31373137{
     3138    if (!PDMCritSectIsInitialized(&pVM->em.s.CritSectREM))
     3139        return true;   /* early init */
     3140
    31383141    return PDMCritSectIsOwner(&pVM->em.s.CritSectREM);
    31393142}
     
    31453148 * @param   pVM         The VM to operate on.
    31463149 */
    3147 VMMDECL(int) EMTryEnterRemLock(PVM pVM)
    3148 {
     3150VMMDECL(int) EMRemTryLock(PVM pVM)
     3151{
     3152    if (!PDMCritSectIsInitialized(&pVM->em.s.CritSectREM))
     3153        return VINF_SUCCESS; /* early init */
     3154
    31493155    return PDMCritSectTryEnter(&pVM->em.s.CritSectREM);
    31503156}
  • trunk/src/VBox/VMM/VMMAll/REMAll.cpp

    r35346 r37702  
    4747     */
    4848    if (   pVM->rem.s.cInvalidatedPages < RT_ELEMENTS(pVM->rem.s.aGCPtrInvalidatedPages)
    49         && EMTryEnterRemLock(pVM) == VINF_SUCCESS)
     49        && EMRemTryLock(pVM) == VINF_SUCCESS)
    5050    {
    5151        uint32_t iPage = pVM->rem.s.cInvalidatedPages;
Note: See TracChangeset for help on using the changeset viewer.

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