VirtualBox

Changeset 17058 in vbox


Ignore:
Timestamp:
Feb 24, 2009 12:21:56 PM (16 years ago)
Author:
vboxsync
Message:

More updates for temp locks.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pgm.h

    r17057 r17058  
    459459VMMDECL(int)        PGMDynLockHCPage(PVM pVM, RCPTRTYPE(uint8_t *) GCPage);
    460460VMMDECL(int)        PGMDynUnlockHCPage(PVM pVM, RCPTRTYPE(uint8_t *) GCPage);
     461#  ifdef VBOX_STRICT
     462VMMDECL(void)       PGMDynCheckLocks(PVM pVM);
     463#  endif
    461464# endif
    462465VMMDECL(void)       PGMDynMapStartAutoSet(PVMCPU pVCpu);
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r17057 r17058  
    22502250}
    22512251
     2252# ifdef VBOX_STRICT
     2253/**
     2254 * Check for lock leaks.
     2255 *
     2256 * @param   pVM         VM handle.
     2257 */
     2258VMMDECL(void) PGMDynCheckLocks(PVM pVM)
     2259{
     2260    for (unsigned i=0;i<(MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT);i++)
     2261        Assert(!(pVM->pgm.s.paDynPageMap32BitPTEsGC[i].u & PGM_PTFLAGS_DYN_LOCKED));
     2262}
     2263# endif
    22522264# endif /* IN_RC */
    22532265
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r17001 r17058  
    8282PGM_BTH_DECL(int, Trap0eHandler)(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault)
    8383{
     84# if defined(IN_RC) && defined(VBOX_WITH_PGMPOOL_PAGING_ONLY)
     85    PGMDynCheckLocks(pVM);
     86# endif
     87
    8488# if  (PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64) \
    8589    && PGM_SHW_TYPE != PGM_TYPE_NESTED    \
     
    24522456    Assert(!PdeDst.n.u1Present); /* We're only supposed to call SyncPT on PDE!P and conflicts.*/
    24532457
     2458# if defined(IN_RC) && defined(VBOX_WITH_PGMPOOL_PAGING_ONLY)
     2459    /* Make sure the dynamic pPdeDst mapping will not be reused during this function. */
     2460    PGMDynLockHCPage(pVM, pPdeDst);
     2461# endif
     2462
    24542463    /*
    24552464     * Sync page directory entry.
     
    25182527            }
    25192528            *pPdeDst = PdeDst;
     2529# if defined(IN_RC) && defined(VBOX_WITH_PGMPOOL_PAGING_ONLY)
     2530            PGMDynUnlockHCPage(pVM, pPdeDst);
     2531# endif
    25202532            return VINF_SUCCESS;
    25212533        }
     
    25232535        {
    25242536            VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
     2537# if defined(IN_RC) && defined(VBOX_WITH_PGMPOOL_PAGING_ONLY)
     2538            PGMDynUnlockHCPage(pVM, pPdeDst);
     2539# endif
    25252540            return VINF_PGM_SYNC_CR3;
    25262541        }
     
    25532568                         | (PdeSrc.u & ~(GST_PDE_PG_MASK | X86_PDE_AVL_MASK | X86_PDE_PCD | X86_PDE_PWT | X86_PDE_PS | X86_PDE4M_G | X86_PDE4M_D));
    25542569                *pPdeDst = PdeDst;
     2570# if defined(IN_RC) && defined(VBOX_WITH_PGMPOOL_PAGING_ONLY)           
     2571                PGMDynUnlockHCPage(pVM, pPdeDst);
     2572# endif
    25552573
    25562574                /*
     
    26562674            }
    26572675            *pPdeDst = PdeDst;
     2676# if defined(IN_RC) && defined(VBOX_WITH_PGMPOOL_PAGING_ONLY)           
     2677            PGMDynUnlockHCPage(pVM, pPdeDst);
     2678# endif
    26582679
    26592680            /*
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