VirtualBox

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


Ignore:
Timestamp:
Apr 24, 2009 6:34:55 PM (16 years ago)
Author:
vboxsync
Message:

PGMAllPhys.cpp: PGMPhysGCPhys2HCPhys should take the pgm lock before accessing the ram pages. (No critical usage, mostly the debugger & dbgf.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r19141 r19180  
    179179VMMDECL(int) PGMPhysGCPhys2HCPhys(PVM pVM, RTGCPHYS GCPhys, PRTHCPHYS pHCPhys)
    180180{
     181    pgmLock(pVM);
    181182    PPGMPAGE pPage;
    182183    int rc = pgmPhysGetPageEx(&pVM->pgm.s, GCPhys, &pPage);
    183     if (RT_FAILURE(rc))
    184         return rc;
    185 
    186     *pHCPhys = PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK);
    187     return VINF_SUCCESS;
     184    if (RT_SUCCESS(rc))
     185        *pHCPhys = PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK);
     186    pgmUnlock(pVM);
     187    return rc;
    188188}
    189189
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