VirtualBox

Changeset 17135 in vbox for trunk


Ignore:
Timestamp:
Feb 25, 2009 3:27:37 PM (16 years ago)
Author:
vboxsync
Message:

VBOX_WITH_PGMPOOL_PAGING_ONLY: Disallow ring 3 jumps when in an inconsistent state during CR3 switching.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r17134 r17135  
    46564656    rc = VINF_SUCCESS;
    46574657
     4658#  ifdef IN_RC
     4659    /** NOTE: We can't deal with jumps to ring 3 here as we're now in an inconsistent state! */
     4660#  endif
    46584661    pVM->pgm.s.iShwUser      = SHW_POOL_ROOT_IDX;
    46594662    pVM->pgm.s.iShwUserTable = GCPhysCR3 >> PAGE_SHIFT;
     
    46914694    CPUMSetHyperCR3(pVM, PGMGetHyperCR3(pVM));
    46924695
     4696#  ifdef IN_RC
     4697    /** NOTE: Everything safe again. */
     4698#  endif
     4699
    46934700    /* Clean up the old CR3 root. */
    46944701    if (pOldShwPageCR3)
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r17133 r17135  
    44744474 *
    44754475 * @param   pPool       The pool.
     4476 * @param   enmKind     Page table kind
    44764477 * @param   iUser       The user of the page.
    44774478 */
    4478 static int pgmPoolMakeMoreFreePages(PPGMPOOL pPool, uint16_t iUser)
     4479static int pgmPoolMakeMoreFreePages(PPGMPOOL pPool, PGMPOOLKIND enmKind, uint16_t iUser)
    44794480{
    44804481    LogFlow(("pgmPoolMakeMoreFreePages: iUser=%#x\n", iUser));
     
    44834484     * If the pool isn't full grown yet, expand it.
    44844485     */
    4485     if (pPool->cCurPages < pPool->cMaxPages)
     4486    if (    pPool->cCurPages < pPool->cMaxPages
     4487#if defined(VBOX_WITH_PGMPOOL_PAGING_ONLY) && defined(IN_RC)
     4488        /* Hack alert: we can't deal with jumps to ring 3 when called from MapCR3 and allocating pages for PAE PDs. */
     4489        &&  enmKind != PGMPOOLKIND_PAE_PD_FOR_PAE_PD
     4490        &&  (enmKind < PGMPOOLKIND_PAE_PD0_FOR_32BIT_PD || enmKind > PGMPOOLKIND_PAE_PD3_FOR_32BIT_PD)
     4491#endif
     4492        )
    44864493    {
    44874494        STAM_PROFILE_ADV_SUSPEND(&pPool->StatAlloc, a);
     
    45674574    if (iNew == NIL_PGMPOOL_IDX)
    45684575    {
    4569         rc = pgmPoolMakeMoreFreePages(pPool, iUser);
     4576        rc = pgmPoolMakeMoreFreePages(pPool, enmKind, iUser);
    45704577        if (RT_FAILURE(rc))
    45714578        {
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