VirtualBox

Changeset 7668 in vbox


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

Cleaned up

File:
1 edited

Legend:

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

    r7667 r7668  
    864864            PPGMPOOLPAGE    pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK);
    865865            RTGCPHYS        GCPhys   = PdeSrc.u & GST_PDE_PG_MASK;
    866 #  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    867       && PGM_GST_TYPE == PGM_TYPE_32BIT   
    868             /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
     866#  if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     867            /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
    869868            GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2);
    870869#  endif
     
    911910            PPGMPOOLPAGE    pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK);
    912911            RTGCPHYS        GCPhys   = PdeSrc.u & GST_PDE_BIG_PG_MASK;
    913 #  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    914       && PGM_GST_TYPE == PGM_TYPE_32BIT   
    915             /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs. (32 bits guest; PAE shadow)*/
     912# if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     913            /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs.*/
    916914            GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT);
    917915#  endif
     
    12711269    {
    12721270        GCPhys = PdeSrc.u & GST_PDE_PG_MASK;
    1273 #  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    1274       && PGM_GST_TYPE == PGM_TYPE_32BIT   
    1275         /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
     1271# if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     1272        /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
    12761273        GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2);
    12771274# endif
     
    12801277    {
    12811278        GCPhys = PdeSrc.u & GST_PDE_BIG_PG_MASK;
    1282 #  if    PGM_SHW_TYPE != PGM_TYPE_32BIT \
    1283       && PGM_GST_TYPE == PGM_TYPE_32BIT
    1284         /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs. (32 bits guest; PAE shadow)*/
     1279# if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     1280        /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs.*/
    12851281        GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT);
    12861282# endif
     
    13261322                         */
    13271323                        unsigned        iPTDst    = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK;
    1328 #  if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
    1329       || PGM_GST_TYPE != PGM_TYPE_32BIT
     1324#  if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     1325                        /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
     1326                        const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
     1327#  else
    13301328                        const unsigned  offPTSrc  = 0;
    1331 #  else
    1332                         /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    1333                         const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
    13341329#  endif
    13351330                        const unsigned  iPTDstEnd = RT_MIN(iPTDst + PGM_SYNC_NR_PAGES / 2, ELEMENTS(pPTDst->a));
     
    15041499    PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR(pVM, pShwPage);
    15051500
    1506 # if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
    1507      || PGM_GST_TYPE != PGM_TYPE_32BIT
     1501# if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     1502    /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
     1503    const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
     1504# else
    15081505    const unsigned  offPTSrc  = 0;
    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) */
    1511     const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
    15121506# endif
    15131507
     
    20112005                const unsigned  iPTDstEnd = ELEMENTS(pPTDst->a);
    20122006# endif /* !PGM_SYNC_N_PAGES */
    2013 #  if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
    2014       || PGM_GST_TYPE != PGM_TYPE_32BIT
     2007#  if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     2008                /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
     2009                const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
     2010#  else
    20152011                const unsigned  offPTSrc  = 0;
    2016 #  else
    2017                 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */
    2018                 const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
    20192012#  endif
    20202013                for (; iPTDst < iPTDstEnd; iPTDst++)
     
    30753068
    30763069                /* iterate the page table. */
    3077 # if    PGM_SHW_TYPE == PGM_TYPE_32BIT \
    3078      || PGM_GST_TYPE != PGM_TYPE_32BIT
     3070# if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     3071                /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
     3072                const unsigned offPTSrc  = ((GCPtr >> SHW_PD_SHIFT) & 1) * 512;
     3073# else
    30793074                const unsigned offPTSrc  = 0;
    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) */
    3082                 const unsigned offPTSrc  = ((GCPtr >> SHW_PD_SHIFT) & 1) * 512;
    30833075# endif
    30843076                for (unsigned iPT = 0, off = 0;
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