VirtualBox

Changeset 7820 in vbox for trunk/src


Ignore:
Timestamp:
Apr 9, 2008 8:16:01 AM (17 years ago)
Author:
vboxsync
Message:

Lazy clearing of PAE page directory

File:
1 edited

Legend:

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

    r7819 r7820  
    104104# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    105105    PX86PD          pPDDst = pVM->pgm.s.CTXMID(p,32BitPD);
    106 # else /* PAE */
     106# elif PGM_SHW_TYPE == PGM_TYPE_PAE
    107107    PX86PDPAE       pPDDst = pVM->pgm.s.CTXMID(ap,PaePDs)[0]; /* We treat this as a PD with 2048 entries. */
     108
     109#  if PGM_GST_TYPE == PGM_TYPE_PAE
     110    /* Did we mark the PDPT as not present in SyncCR3? */
     111    unsigned iPDPTE = ((RTGCUINTPTR)pvFault >> SHW_PDPT_SHIFT) & SHW_PDPT_MASK;
     112    if (!pVM->pgm.s.CTXMID(p,PaePDPT)->a[iPDPTE].n.u1Present)
     113    {
     114        /* lazily clear the page directory */
     115        ASMMemZero32(pVM->pgm.s.CTXMID(ap,PaePDs)[iPDPTE], PAGE_SIZE);
     116        pVM->pgm.s.CTXMID(p,PaePDPT)->a[iPDPTE].n.u1Present = 1;
     117    }
     118#  endif
     119# else
     120    AssertFailed();
    108121# endif
    109122
     
    26712684        {
    26722685            /* PDPT not present */
    2673             /** @todo expensive */
    2674             ASMMemZero32(pVM->pgm.s.CTXMID(ap,PaePDs)[iPDPTE], PAGE_SIZE);
     2686            pVM->pgm.s.CTXMID(p,PaePDPT)->a[iPDPTE].n.u1Present = 0;
    26752687            continue;
    26762688        }
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