VirtualBox

Changeset 20808 in vbox


Ignore:
Timestamp:
Jun 23, 2009 8:43:53 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
48945
Message:

Removed dead code

Location:
trunk/src/VBox/VMM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r20277 r20808  
    30313031        }
    30323032
    3033         pPGM->fPhysCacheFlushPending = true;
    30343033        pgmR3HandlerPhysicalUpdateAll(pVM);
    30353034
  • trunk/src/VBox/VMM/PGMHandler.cpp

    r20151 r20808  
    390390            PVMCPU pVCpu = VMMGetCpu(pVM);
    391391
    392             pVM->pgm.s.fPhysCacheFlushPending = true;
    393 
    394392            pVCpu->pgm.s.fSyncFlags |= PGM_SYNC_UPDATE_PAGE_BIT_VIRTUAL | PGM_SYNC_CLEAR_PGM_POOL;
    395393            VMCPU_FF_SET(pVCpu, VMCPU_FF_PGM_SYNC_CR3);
  • trunk/src/VBox/VMM/PGMInternal.h

    r20795 r20808  
    8484#define PGM_MAX_PHYSCACHE_ENTRIES       64
    8585#define PGM_MAX_PHYSCACHE_ENTRIES_MASK  (PGM_MAX_PHYSCACHE_ENTRIES-1)
    86 
    87 /**
    88  * Enable caching of PGMR3PhysRead/WriteByte/Word/Dword
    89  */
    90 #define PGM_PHYSMEMACCESS_CACHING
    9186
    9287/** @def PGMPOOL_WITH_CACHE
     
    23712366    bool                            fNoMorePhysWrites;
    23722367
    2373     /** Flush the cache on the next access. */
    2374     bool                            fPhysCacheFlushPending;
    2375 /** @todo r=bird: Fix member names!*/
    2376     /** PGMPhysRead cache */
    2377     PGMPHYSCACHE                    pgmphysreadcache;
    2378     /** PGMPhysWrite cache */
    2379     PGMPHYSCACHE                    pgmphyswritecache;
    2380 
    23812368    /**
    23822369     * Data associated with managing the ring-3 mappings of the allocation chunks.
  • trunk/src/VBox/VMM/PGMPhysRWTmpl.h

    r17534 r20808  
    3232VMMDECL(PGMPHYS_DATATYPE) PGMPHYSFN_READNAME(PVM pVM, RTGCPHYS GCPhys)
    3333{
    34     uint32_t iCacheIndex;
    35 
    3634    Assert(VM_IS_EMT(pVM));
    37 
    38 #ifdef PGM_PHYSMEMACCESS_CACHING
    39     if (pVM->pgm.s.fPhysCacheFlushPending)
    40     {
    41         pVM->pgm.s.pgmphysreadcache.aEntries  = 0;   /* flush cache; physical or virtual handlers have changed */
    42         pVM->pgm.s.pgmphyswritecache.aEntries = 0;   /* flush cache; physical or virtual handlers have changed */
    43         pVM->pgm.s.fPhysCacheFlushPending = false;
    44     }
    45     else
    46     if (    ASMBitTest(&pVM->pgm.s.pgmphysreadcache.aEntries, (iCacheIndex = ((GCPhys >> PAGE_SHIFT) & PGM_MAX_PHYSCACHE_ENTRIES_MASK)))
    47         &&  pVM->pgm.s.pgmphysreadcache.Entry[iCacheIndex].GCPhys == PHYS_PAGE_ADDRESS(GCPhys)
    48 #if PGMPHYS_DATASIZE != 1
    49         &&  PHYS_PAGE_ADDRESS(GCPhys) == PHYS_PAGE_ADDRESS(GCPhys + sizeof(PGMPHYS_DATATYPE) - 1) /** (GCPhys & PAGE_OFFSET_MASK) <= PAGE_SIZE - sizeof(PGMPHYS_DATATYPE) */
    50 #endif
    51        )
    52     {
    53         RTGCPHYS off = GCPhys - pVM->pgm.s.pgmphysreadcache.Entry[iCacheIndex].GCPhys;
    54         return *(PGMPHYS_DATATYPE *)(pVM->pgm.s.pgmphysreadcache.Entry[iCacheIndex].pbR3 + off);
    55     }
    56 #endif /* PGM_PHYSMEMACCESS_CACHING */
    5735    PGMPHYS_DATATYPE val;
    58 
    5936    PGMPhysRead(pVM, GCPhys, &val, sizeof(val));
    6037    return val;
     
    7451VMMDECL(void) PGMPHYSFN_WRITENAME(PVM pVM, RTGCPHYS GCPhys, PGMPHYS_DATATYPE val)
    7552{
    76     uint32_t iCacheIndex;
    77 
    7853    Assert(VM_IS_EMT(pVM));
    79 
    80 #ifdef PGM_PHYSMEMACCESS_CACHING
    81     if (pVM->pgm.s.fPhysCacheFlushPending)
    82     {
    83         pVM->pgm.s.pgmphysreadcache.aEntries  = 0;   /* flush cache; physical or virtual handlers have changed */
    84         pVM->pgm.s.pgmphyswritecache.aEntries = 0;   /* flush cache; physical or virtual handlers have changed */
    85         pVM->pgm.s.fPhysCacheFlushPending = false;
    86     }
    87     else
    88     if (    ASMBitTest(&pVM->pgm.s.pgmphyswritecache.aEntries, (iCacheIndex = ((GCPhys >> PAGE_SHIFT) & PGM_MAX_PHYSCACHE_ENTRIES_MASK)))
    89         &&  pVM->pgm.s.pgmphyswritecache.Entry[iCacheIndex].GCPhys == PHYS_PAGE_ADDRESS(GCPhys)
    90 #if PGMPHYS_DATASIZE != 1
    91         &&  PHYS_PAGE_ADDRESS(GCPhys) == PHYS_PAGE_ADDRESS(GCPhys + sizeof(val) - 1)
    92 #endif
    93        )
    94     {
    95         RTGCPHYS off = GCPhys - pVM->pgm.s.pgmphyswritecache.Entry[iCacheIndex].GCPhys;
    96         *(PGMPHYS_DATATYPE *)(pVM->pgm.s.pgmphyswritecache.Entry[iCacheIndex].pbR3 + off) = val;
    97         return;
    98     }
    99 #endif /* PGM_PHYSMEMACCESS_CACHING */
    10054    PGMPhysWrite(pVM, GCPhys, &val, sizeof(val));
    10155}
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r20788 r20808  
    167167        if (rc == VINF_PGM_SYNC_CR3)
    168168            rc = VINF_PGM_GCPHYS_ALIASED;
    169         pVM->pgm.s.fPhysCacheFlushPending = true;
    170169        pgmUnlock(pVM);
    171170        HWACCMFlushTLBOnAllVCpus(pVM);
     
    421420    HWACCMFlushTLBOnAllVCpus(pVM);
    422421# endif
    423     pVM->pgm.s.fPhysCacheFlushPending = true;
    424422
    425423    /*
     
    549547                     */
    550548                    rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam);
    551                     pVM->pgm.s.fPhysCacheFlushPending = true;
    552549                    pgmUnlock(pVM);
    553550
     
    854851                     */
    855852                    rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam);
    856                     pVM->pgm.s.fPhysCacheFlushPending = true;
    857853                    HWACCMFlushTLBOnAllVCpus(pVM);
    858854                }
  • trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp

    r20784 r20808  
    531531    GEN_CHECK_OFF(PGM, pPoolRC);
    532532    GEN_CHECK_OFF(PGM, fNoMorePhysWrites);
    533     GEN_CHECK_OFF(PGM, fPhysCacheFlushPending);
    534     GEN_CHECK_OFF(PGM, pgmphysreadcache);
    535     GEN_CHECK_OFF(PGM, pgmphyswritecache);
    536533    GEN_CHECK_OFF(PGM, ChunkR3Map);
    537534    GEN_CHECK_OFF(PGM, ChunkR3Map.pTree);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette