VirtualBox

Ignore:
Timestamp:
Jun 7, 2011 3:05:32 PM (14 years ago)
Author:
vboxsync
Message:

PGM: Fixed locking issues in PGMR3PhysMMIORegister and PGMR3PhysMMIODeregister. Also addressed a harmless on in PGMR3PhysRomRegister (only used at init time, so no races). Fortified the code with assertions more lock assertion, replacing the incorrect PGMIsLocked() checks (we only care if the current thread is the lock owner). Cleaned up some ReturnStmt macros and adding more of them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp

    r36983 r37354  
    5353    Log(("PGMR0SharedModuleCheck: check %s %s base=%RGv size=%x\n", pModule->szName, pModule->szVersion, pModule->Core.Key, pModule->cbModule));
    5454
    55     Assert(PGMIsLockOwner(pVM));    /* This cannot fail as we grab the lock in pgmR3SharedModuleRegRendezvous before calling into ring-0. */
     55    PGM_LOCK_ASSERT_OWNER(pVM);     /* This cannot fail as we grab the lock in pgmR3SharedModuleRegRendezvous before calling into ring-0. */
    5656
    5757    /* Check every region of the shared module. */
     
    104104
    105105                                /* Update the physical address and page id now. */
    106                                 PGM_PAGE_SET_HCPHYS(pPage, PageDesc.HCPhys);
    107                                 PGM_PAGE_SET_PAGEID(pPage, PageDesc.uHCPhysPageId);
     106                                PGM_PAGE_SET_HCPHYS(pVM, pPage, PageDesc.HCPhys);
     107                                PGM_PAGE_SET_PAGEID(pVM, pPage, PageDesc.uHCPhysPageId);
    108108
    109109                                /* Invalidate page map TLB entry for this page too. */
    110                                 PGMPhysInvalidatePageMapTLBEntry(pVM, PageDesc.GCPhys);
     110                                pgmPhysInvalidatePageMapTLBEntry(pVM, PageDesc.GCPhys);
    111111                                pVM->pgm.s.cReusedSharedPages++;
    112112                            }
     
    115115                            pVM->pgm.s.cSharedPages++;
    116116                            pVM->pgm.s.cPrivatePages--;
    117                             PGM_PAGE_SET_STATE(pPage, PGM_PAGE_STATE_SHARED);
     117                            PGM_PAGE_SET_STATE(pVM, pPage, PGM_PAGE_STATE_SHARED);
    118118                        }
    119119                    }
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