VirtualBox

Changeset 1996 in vbox for trunk/src


Ignore:
Timestamp:
Apr 9, 2007 1:36:57 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
20283
Message:

Round address to page boundary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PATM/CSAM.cpp

    r1995 r1996  
    15111511CSAMR3DECL(int) CSAMR3FlushPage(PVM pVM, RTGCPTR addr)
    15121512{
    1513     addr = addr & PAGE_BASE_GC_MASK;
    15141513    return csamFlushPage(pVM, addr, true /* remove page record */);
    15151514}
     
    15241523CSAMR3DECL(int) CSAMR3RemovePage(PVM pVM, RTGCPTR addr)
    15251524{
    1526     int rc = csamRemovePageRecord(pVM, addr);
    1527     if (VBOX_SUCCESS(rc))
    1528         PATMR3FlushPage(pVM, addr);
    1529     return VINF_SUCCESS;
     1525    PCSAMPAGEREC pPageRec;
     1526    int          rc;
     1527
     1528    addr = addr & PAGE_BASE_GC_MASK;
     1529
     1530    pPageRec = (PCSAMPAGEREC)RTAvlPVGet(&pVM->csam.s.pPageTree, (AVLPVKEY)addr);
     1531    if (pPageRec)
     1532    {
     1533        rc = csamRemovePageRecord(pVM, addr);
     1534        if (VBOX_SUCCESS(rc))
     1535            PATMR3FlushPage(pVM, addr);
     1536        return VINF_SUCCESS;
     1537    }
     1538    return VWRN_CSAM_PAGE_NOT_FOUND;
    15301539}
    15311540
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