VirtualBox

Changeset 7667 in vbox for trunk/src


Ignore:
Timestamp:
Mar 31, 2008 3:16:20 PM (17 years ago)
Author:
vboxsync
Message:

More comments + PAE updates

File:
1 edited

Legend:

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

    r7666 r7667  
    866866#  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    867867      && PGM_GST_TYPE == PGM_TYPE_32BIT   
    868             /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
     868            /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    869869            GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2);
    870870#  endif
     
    913913#  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    914914      && PGM_GST_TYPE == PGM_TYPE_32BIT   
    915             /* Select the right PDE as we're emulating a 4MB page with two 2 MB shadow PDEs */
     915            /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs. (32 bits guest; PAE shadow)*/
    916916            GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT);
    917917#  endif
     
    12731273#  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    12741274      && PGM_GST_TYPE == PGM_TYPE_32BIT   
    1275             /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
    1276         /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
     1275        /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    12771276        GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2);
    12781277# endif
     
    12831282#  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    12841283      && PGM_GST_TYPE == PGM_TYPE_32BIT
    1285         /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs */
     1284        /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs. (32 bits guest; PAE shadow)*/
    12861285        GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT);
    12871286# endif
     
    13271326                         */
    13281327                        unsigned        iPTDst    = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK;
    1329 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
     1328#  if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
     1329      || PGM_GST_TYPE != PGM_TYPE_32BIT
    13301330                        const unsigned  offPTSrc  = 0;
    13311331#  else
     1332                        /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    13321333                        const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
    13331334#  endif
     
    15031504    PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR(pVM, pShwPage);
    15041505
    1505 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
     1506# if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
     1507     || PGM_GST_TYPE != PGM_TYPE_32BIT
    15061508    const unsigned  offPTSrc  = 0;
    1507 #  else
     1509# else
     1510    /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    15081511    const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
    1509 #  endif
     1512# endif
    15101513
    15111514    Assert(cPages == 1 || !(uErr & X86_TRAP_PF_P));
     
    20082011                const unsigned  iPTDstEnd = ELEMENTS(pPTDst->a);
    20092012# endif /* !PGM_SYNC_N_PAGES */
    2010 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
     2013#  if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
     2014      || PGM_GST_TYPE != PGM_TYPE_32BIT
    20112015                const unsigned  offPTSrc  = 0;
    20122016#  else
     2017                /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    20132018                const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
    20142019#  endif
     
    30703075
    30713076                /* iterate the page table. */
    3072 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
     3077# if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
     3078     || PGM_GST_TYPE != PGM_TYPE_32BIT
    30733079                const unsigned offPTSrc  = 0;
    3074 #  else
     3080# else
     3081                /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    30753082                const unsigned offPTSrc  = ((GCPtr >> SHW_PD_SHIFT) & 1) * 512;
    3076 #  endif
     3083# endif
    30773084                for (unsigned iPT = 0, off = 0;
    30783085                     iPT < ELEMENTS(pPTDst->a);
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