VirtualBox

Changeset 7598 in vbox for trunk/src/VBox/VMM/PGMPhys.h


Ignore:
Timestamp:
Mar 27, 2008 4:08:49 PM (17 years ago)
Author:
vboxsync
Message:

Corrected wrong macro use to mask physical addresses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMPhys.h

    r5999 r7598  
    4141    else
    4242    if (    ASMBitTest(&pVM->pgm.s.pgmphysreadcache.aEntries, (iCacheIndex = ((GCPhys >> PAGE_SHIFT) & PGM_MAX_PHYSCACHE_ENTRIES_MASK)))
    43         &&  pVM->pgm.s.pgmphysreadcache.Entry[iCacheIndex].GCPhys == PAGE_ADDRESS(GCPhys) /** @todo r=bird: wrong macro. You don't want an uintptr_t! */
     43        &&  pVM->pgm.s.pgmphysreadcache.Entry[iCacheIndex].GCPhys == PHYS_PAGE_ADDRESS(GCPhys)
    4444#if PGMPHYS_DATASIZE != 1
    45         &&  PAGE_ADDRESS(GCPhys) == PAGE_ADDRESS(GCPhys + sizeof(PGMPHYS_DATATYPE) - 1) /** (GCPhys & PAGE_OFFSET_MASK) <= PAGE_SIZE - sizeof(PGMPHYS_DATATYPE) */
     45        &&  PHYS_PAGE_ADDRESS(GCPhys) == PHYS_PAGE_ADDRESS(GCPhys + sizeof(PGMPHYS_DATATYPE) - 1) /** (GCPhys & PAGE_OFFSET_MASK) <= PAGE_SIZE - sizeof(PGMPHYS_DATATYPE) */
    4646#endif
    4747       )
     
    8383    else
    8484    if (    ASMBitTest(&pVM->pgm.s.pgmphyswritecache.aEntries, (iCacheIndex = ((GCPhys >> PAGE_SHIFT) & PGM_MAX_PHYSCACHE_ENTRIES_MASK)))
    85         &&  pVM->pgm.s.pgmphyswritecache.Entry[iCacheIndex].GCPhys == PAGE_ADDRESS(GCPhys)
     85        &&  pVM->pgm.s.pgmphyswritecache.Entry[iCacheIndex].GCPhys == PHYS_PAGE_ADDRESS(GCPhys)
    8686#if PGMPHYS_DATASIZE != 1
    87         &&  PAGE_ADDRESS(GCPhys) == PAGE_ADDRESS(GCPhys + sizeof(val) - 1)
     87        &&  PHYS_PAGE_ADDRESS(GCPhys) == PHYS_PAGE_ADDRESS(GCPhys + sizeof(val) - 1)
    8888#endif
    8989       )
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