VirtualBox

Changeset 31851 in vbox


Ignore:
Timestamp:
Aug 23, 2010 8:18:42 AM (14 years ago)
Author:
vboxsync
Message:

pgmPoolAllocEx/pgmPoolAlloc: Just use pgmPoolAllocEx when you want locking.

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

Legend:

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

    r31141 r31851  
    163163    pVCpu->pgm.s.iShwUser      = SHW_POOL_ROOT_IDX;
    164164    pVCpu->pgm.s.iShwUserTable = GCPhysCR3 >> PAGE_SHIFT;
    165     int rc = pgmPoolAlloc(pVM, GCPhysCR3, BTH_PGMPOOLKIND_ROOT, pVCpu->pgm.s.iShwUser, pVCpu->pgm.s.iShwUserTable, &pVCpu->pgm.s.pShwPageCR3R3);
     165    int rc = pgmPoolAlloc(pVM, GCPhysCR3, BTH_PGMPOOLKIND_ROOT, pVCpu->pgm.s.iShwUser, pVCpu->pgm.s.iShwUserTable,
     166                          &pVCpu->pgm.s.pShwPageCR3R3);
    166167    if (rc == VERR_PGM_POOL_FLUSHED)
    167168    {
  • trunk/src/VBox/VMM/PGMInternal.h

    r31850 r31851  
    38003800# endif
    38013801#endif
    3802 int             pgmPoolAllocEx(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, PGMPOOLACCESS enmAccess, uint16_t iUser, uint32_t iUserTable, PPPGMPOOLPAGE ppPage, bool fLockPage = false);
    3803 
    3804 DECLINLINE(int) pgmPoolAlloc(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, uint16_t iUser, uint32_t iUserTable, PPPGMPOOLPAGE ppPage, bool fLockPage = false)
    3805 {
    3806     return pgmPoolAllocEx(pVM, GCPhys, enmKind, PGMPOOLACCESS_DONTCARE, iUser, iUserTable, ppPage, fLockPage);
     3802int             pgmPoolAllocEx(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, PGMPOOLACCESS enmAccess, uint16_t iUser,
     3803                               uint32_t iUserTable, bool fLockPage, PPPGMPOOLPAGE ppPage);
     3804
     3805DECLINLINE(int) pgmPoolAlloc(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, uint16_t iUser, uint32_t iUserTable,
     3806                             PPPGMPOOLPAGE ppPage)
     3807{
     3808    return pgmPoolAllocEx(pVM, GCPhys, enmKind, PGMPOOLACCESS_DONTCARE, iUser, iUserTable, false, ppPage);
    38073809}
    38083810
  • trunk/src/VBox/VMM/PGMShw.h

    r31775 r31851  
    194194    pgmLock(pVM);
    195195
    196     int rc = pgmPoolAlloc(pVM, GCPhysCR3, PGMPOOLKIND_ROOT_NESTED, PGMPOOL_IDX_NESTED_ROOT, GCPhysCR3 >> PAGE_SHIFT, &pNewShwPageCR3, true /* lock page */);
     196    int rc = pgmPoolAllocEx(pVM, GCPhysCR3, PGMPOOLKIND_ROOT_NESTED, PGMPOOLACCESS_DONTCARE, PGMPOOL_IDX_NESTED_ROOT,
     197                            GCPhysCR3 >> PAGE_SHIFT, true /*fLockPage*/, &pNewShwPageCR3);
    197198    AssertFatalRC(rc);
    198199
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r31849 r31851  
    26172617            GCPhys |= (iPDDst & 1) * (PAGE_SIZE / 2);
    26182618# endif
    2619             rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_PT, pShwPde->idx,      iPDDst, &pShwPage);
     2619            rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_PT, pShwPde->idx, iPDDst, &pShwPage);
    26202620        }
    26212621        else
     
    26482648                    enmAccess = (fNoExecute) ? PGMPOOLACCESS_SUPERVISOR_R_NX  : PGMPOOLACCESS_SUPERVISOR_R;
    26492649            }
    2650             rc = pgmPoolAllocEx(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_BIG, enmAccess, pShwPde->idx, iPDDst, &pShwPage);
     2650            rc = pgmPoolAllocEx(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_BIG, enmAccess, pShwPde->idx, iPDDst, false /*fLockPage*/,
     2651                                &pShwPage);
    26512652        }
    26522653        if (rc == VINF_SUCCESS)
     
    44944495
    44954496    Assert(!(GCPhysCR3 >> (PAGE_SHIFT + 32)));
    4496     rc = pgmPoolAlloc(pVM, GCPhysCR3 & GST_CR3_PAGE_MASK, BTH_PGMPOOLKIND_ROOT, SHW_POOL_ROOT_IDX, GCPhysCR3 >> PAGE_SHIFT, &pNewShwPageCR3, true /* lock page */);
     4497    rc = pgmPoolAllocEx(pVM, GCPhysCR3 & GST_CR3_PAGE_MASK, BTH_PGMPOOLKIND_ROOT, PGMPOOLACCESS_DONTCARE, SHW_POOL_ROOT_IDX,
     4498                        GCPhysCR3 >> PAGE_SHIFT, true /*fLockPage*/, &pNewShwPageCR3);
    44974499    AssertFatalRC(rc);
    44984500    rc = VINF_SUCCESS;
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r31849 r31851  
    47554755 * @param   iUser       The shadow page pool index of the user table.
    47564756 * @param   iUserTable  The index into the user table (shadowed).
     4757 * @param   fLockPage   Lock the page
    47574758 * @param   ppPage      Where to store the pointer to the page. NULL is stored here on failure.
    4758  * @param   fLockPage   Lock the page
    4759  */
    4760 int pgmPoolAllocEx(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, PGMPOOLACCESS enmAccess, uint16_t iUser, uint32_t iUserTable, PPPGMPOOLPAGE ppPage, bool fLockPage)
     4759 */
     4760int pgmPoolAllocEx(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, PGMPOOLACCESS enmAccess, uint16_t iUser, uint32_t iUserTable,
     4761                   bool fLockPage, PPPGMPOOLPAGE ppPage)
    47614762{
    47624763    PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
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