VirtualBox

Changeset 33771 in vbox


Ignore:
Timestamp:
Nov 4, 2010 2:56:18 PM (14 years ago)
Author:
vboxsync
Message:

Mark base page as type page table when activating a 4 kb page inside of the 2 mb range.

File:
1 edited

Legend:

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

    r33540 r33771  
    386386        &&  PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM)
    387387    {
    388         int rc = pgmPhysAllocLargePage(pVM, GCPhys);
    389         if (rc == VINF_SUCCESS)
    390             return rc;
     388        RTGCPHYS GCPhysBase = GCPhys & X86_PDE2M_PAE_PG_MASK;
     389        PPGMPAGE pBasePage;
     390
     391        int rc = pgmPhysGetPageEx(&pVM->pgm.s, GCPhysBase, &pBasePage);
     392        AssertRCReturn(rc, rc);     /* paranoia; can't happen. */
     393        if (PGM_PAGE_GET_PDE_TYPE(pBasePage) == PGM_PAGE_PDE_TYPE_DONTCARE)
     394        {
     395            rc = pgmPhysAllocLargePage(pVM, GCPhys);
     396            if (rc == VINF_SUCCESS)
     397                return rc;
     398        }
     399        /* Mark the base as type page table, so we don't check over and over again. */
     400        PGM_PAGE_SET_PDE_TYPE(pBasePage, PGM_PAGE_PDE_TYPE_PT);
    391401
    392402        /* fall back to 4KB pages. */
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