VirtualBox

Changeset 8048 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 16, 2008 2:48:25 PM (17 years ago)
Author:
vboxsync
Message:

Indent

File:
1 edited

Legend:

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

    r8047 r8048  
    820820     */
    821821    const unsigned  iPDDst = GCPtrPage >> SHW_PD_SHIFT;
    822 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
     822# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    823823    PX86PDE     pPdeDst = &pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst];
    824 #  else
     824# else
    825825    PX86PDEPAE  pPdeDst = &pVM->pgm.s.CTXMID(ap,PaePDs[0])->a[iPDDst];
    826 #  endif
     826# endif
    827827    const SHWPDE PdeDst = *pPdeDst;
    828828    if (!PdeDst.n.u1Present)
     
    835835     * Get the guest PD entry and calc big page.
    836836     */
    837 #  if PGM_GST_TYPE == PGM_TYPE_32BIT
     837# if PGM_GST_TYPE == PGM_TYPE_32BIT
    838838    PX86PD          pPDSrc      = CTXSUFF(pVM->pgm.s.pGuestPD);
    839839    const unsigned  iPDSrc      = GCPtrPage >> GST_PD_SHIFT;
    840840    GSTPDE          PdeSrc      = pPDSrc->a[iPDSrc];
    841 #  else /* PAE */
     841# else /* PAE */
    842842    unsigned        iPDSrc;
    843843    PX86PDPAE       pPDSrc      = pgmGstGetPaePDPtr(&pVM->pgm.s, GCPtrPage, &iPDSrc);
     
    848848    else
    849849        PdeSrc.u = 0;
    850 #  endif
     850# endif
    851851
    852852    const uint32_t  cr4         = CPUMGetGuestCR4(pVM);
    853853    const bool      fIsBigPage  = PdeSrc.b.u1Size && (cr4 & X86_CR4_PSE);
    854854
    855 #  ifdef IN_RING3
     855# ifdef IN_RING3
    856856    /*
    857857     * If a CR3 Sync is pending we may ignore the invalidate page operation
     
    859859     * This doesn't make sense in GC/R0 so we'll skip it entirely there.
    860860     */
    861  ifdef PGM_SKIP_GLOBAL_PAGEDIRS_ON_NONGLOBAL_FLUSH
     861ifdef PGM_SKIP_GLOBAL_PAGEDIRS_ON_NONGLOBAL_FLUSH
    862862    if (    VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3)
    863863        || (   VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3_NON_GLOBAL)
     
    867867           )
    868868       )
    869  else
     869else
    870870    if (VM_FF_ISPENDING(pVM, VM_FF_PGM_SYNC_CR3 | VM_FF_PGM_SYNC_CR3_NON_GLOBAL) )
    871  endif
     871endif
    872872    {
    873873        STAM_COUNTER_INC(&pVM->pgm.s.StatHCInvalidatePageSkipped);
    874874        return VINF_SUCCESS;
    875875    }
    876 #  endif /* IN_RING3 */
     876# endif /* IN_RING3 */
    877877
    878878
     
    905905            PGM_INVL_GUEST_TLBS();
    906906        }
    907 #  ifdef PGM_SYNC_ACCESSED_BIT
     907# ifdef PGM_SYNC_ACCESSED_BIT
    908908        else if (!PdeSrc.n.u1Accessed)
    909909        {
     
    916916            PGM_INVL_GUEST_TLBS();
    917917        }
    918 #  endif
     918# endif
    919919        else if (!fIsBigPage)
    920920        {
     
    924924            PPGMPOOLPAGE    pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK);
    925925            RTGCPHYS        GCPhys   = PdeSrc.u & GST_PDE_PG_MASK;
    926 #  if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     926# if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
    927927            /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
    928928            GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2);
    929 #  endif
     929# endif
    930930            if (pShwPage->GCPhys == GCPhys)
    931931            {
    932 #  if 0 /* likely cause of a major performance regression; must be SyncPageWorkerTrackDeref then */
     932# if 0 /* likely cause of a major performance regression; must be SyncPageWorkerTrackDeref then */
    933933                const unsigned iPTEDst = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK;
    934934                PSHWPT pPT = (PSHWPT)PGMPOOL_PAGE_2_PTR(pVM, pShwPage);
    935935                if (pPT->a[iPTEDst].n.u1Present)
    936936                {
    937  ifdef PGMPOOL_WITH_USER_TRACKING
     937ifdef PGMPOOL_WITH_USER_TRACKING
    938938                    /* This is very unlikely with caching/monitoring enabled. */
    939939                    PGM_BTH_NAME(SyncPageWorkerTrackDeref)(pVM, pShwPage, pPT->a[iPTEDst].u & SHW_PTE_PG_MASK);
    940  endif
     940endif
    941941                    pPT->a[iPTEDst].u = 0;
    942942                }
    943 #  else /* Syncing it here isn't 100% safe and it's probably not worth spending time syncing it. */
     943# else /* Syncing it here isn't 100% safe and it's probably not worth spending time syncing it. */
    944944                rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, GCPtrPage, 1, 0);
    945945                if (VBOX_SUCCESS(rc))
    946946                    rc = VINF_SUCCESS;
    947 #  endif
     947# endif
    948948                STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePage4KBPages));
    949949                PGM_INVL_PG(GCPtrPage);
     
    970970            PPGMPOOLPAGE    pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK);
    971971            RTGCPHYS        GCPhys   = PdeSrc.u & GST_PDE_BIG_PG_MASK;
    972 #  if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     972# if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
    973973            /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs.*/
    974974            GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT);
    975 #  endif
     975# endif
    976976            if (    pShwPage->GCPhys == GCPhys
    977977                &&  pShwPage->enmKind == BTH_PGMPOOLKIND_PT_FOR_BIG)
     
    979979                /* ASSUMES a the given bits are identical for 4M and normal PDEs */
    980980                /** @todo PAT */
    981 #  ifdef PGM_SYNC_DIRTY_BIT
     981# ifdef PGM_SYNC_DIRTY_BIT
    982982                if (        (PdeSrc.u & (X86_PDE_P | X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD))
    983983                        ==  (PdeDst.u & (X86_PDE_P | X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD))
    984984                    &&  (   PdeSrc.b.u1Dirty /** @todo rainy day: What about read-only 4M pages? not very common, but still... */
    985985                         || (PdeDst.u & PGM_PDFLAGS_TRACK_DIRTY)))
    986 #  else
     986# else
    987987                if (    (PdeSrc.u & (X86_PDE_P | X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD))
    988988                    ==  (PdeDst.u & (X86_PDE_P | X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD)))
    989 #  endif
     989# endif
    990990                {
    991991                    LogFlow(("Skipping flush for big page containing %VGv (PD=%X)-> nothing has changed!\n", GCPtrPage, iPDSrc));
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