VirtualBox

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


Ignore:
Timestamp:
Mar 27, 2008 4:08:49 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
29098
Message:

Corrected wrong macro use to mask physical addresses

Location:
trunk/src/VBox/VMM
Files:
2 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       )
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r7597 r7598  
    10641064    Assert(VM_IS_EMT(pVM));
    10651065
    1066     GCPhys = GCPhys & X86_PTE_PAE_PG_MASK;
     1066    GCPhys = PHYS_PAGE_ADDRESS(GCPhys);
    10671067    pbHC   = (uint8_t *)PAGE_ADDRESS(pbHC);
    10681068
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