VirtualBox

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


Ignore:
Timestamp:
May 27, 2009 12:07:38 PM (16 years ago)
Author:
vboxsync
Message:

Bit more REM locking

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/EM.cpp

    r20040 r20071  
    109109static int emR3SingleStepExecRem(PVM pVM, uint32_t cIterations);
    110110static EMSTATE emR3Reschedule(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
    111 static void emR3RemLock(PVM pVM);
    112 static void emR3RemUnlock(PVM pVM);
    113111
    114112/**
     
    872870 * @param   pVM         VM handle.
    873871 */
    874 static void emR3RemLock(PVM pVM)
     872VMMR3DECL(void) EMR3RemLock(PVM pVM)
    875873{
    876874    int rc = PDMCritSectEnter(&pVM->em.s.CritSectREM, VERR_SEM_BUSY);
     
    883881 * @param   pVM         VM handle.
    884882 */
    885 static void emR3RemUnlock(PVM pVM)
     883VMMR3DECL(void) EMR3RemUnlock(PVM pVM)
    886884{
    887885    PDMCritSectLeave(&pVM->em.s.CritSectREM);
     
    901899    LogFlow(("emR3RemStep: cs:eip=%04x:%08x\n", CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
    902900
    903     emR3RemLock(pVM);
     901    EMR3RemLock(pVM);
    904902
    905903    /*
     
    912910        REMR3StateBack(pVM, pVCpu);
    913911    }
    914     emR3RemUnlock(pVM);
     912    EMR3RemUnlock(pVM);
    915913
    916914    LogFlow(("emR3RemStep: returns %Rrc cs:eip=%04x:%08x\n", rc, CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
     
    954952
    955953    /* Big lock, but you are not supposed to own any lock when coming in here. */
    956     emR3RemLock(pVM);
     954    EMR3RemLock(pVM);
    957955
    958956    /*
     
    10771075        STAM_PROFILE_STOP(&pVCpu->em.s.StatREMSync, e);
    10781076    }
    1079     emR3RemUnlock(pVM);
     1077    EMR3RemUnlock(pVM);
    10801078
    10811079    STAM_REL_PROFILE_ADV_STOP(&pVCpu->em.s.StatREMTotal, a);
     
    14821480    STAM_PROFILE_START(&pVCpu->em.s.StatREMEmu, a);
    14831481    Log(("EMINS: %04x:%RGv RSP=%RGv\n", pCtx->cs, (RTGCPTR)pCtx->rip, (RTGCPTR)pCtx->rsp));
    1484     emR3RemLock(pVM);
     1482    EMR3RemLock(pVM);
    14851483    /* Flush the recompiler TLB if the VCPU has changed. */
    14861484    if (pVM->em.s.idLastRemCpu != pVCpu->idCpu)
     
    14891487
    14901488    rc = REMR3EmulateInstruction(pVM, pVCpu);
    1491     emR3RemUnlock(pVM);
     1489    EMR3RemUnlock(pVM);
    14921490    STAM_PROFILE_STOP(&pVCpu->em.s.StatREMEmu, a);
    14931491
     
    24972495        case VERR_REM_FLUSHED_PAGES_OVERFLOW:
    24982496            Assert((pCtx->ss & X86_SEL_RPL) != 1);
    2499             emR3RemLock(pVM);
     2497            EMR3RemLock(pVM);
    25002498            REMR3ReplayInvalidatedPages(pVM, pVCpu);
    2501             emR3RemUnlock(pVM);
     2499            EMR3RemUnlock(pVM);
    25022500            rc = VINF_SUCCESS;
    25032501            break;
     
    34503448        if (VM_FF_IS_PENDING_EXCEPT(pVM, VM_FF_REM_HANDLER_NOTIFY, VM_FF_PGM_NO_MEMORY))
    34513449        {
    3452             emR3RemLock(pVM);
     3450            EMR3RemLock(pVM);
    34533451            REMR3ReplayHandlerNotifications(pVM);
    3454             emR3RemUnlock(pVM);
     3452            EMR3RemUnlock(pVM);
    34553453        }
    34563454
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r19861 r20071  
    18411841        }
    18421842        GMMR3FreePagesCleanup(pReq);
     1843        pgmUnlock(pVM);
    18431844    }
    18441845    else
     
    18461847        /* link in the ram range */
    18471848        pgmR3PhysLinkRamRange(pVM, &pCur->RamRange, pRamPrev);
     1849        pgmUnlock(pVM);
    18481850        REMR3NotifyPhysRamRegister(pVM, GCPhys, pCur->RamRange.cb, REM_NOTIFY_PHYS_RAM_FLAGS_MMIO2);
    18491851    }
    18501852
    1851     pgmUnlock(pVM);
    18521853
    18531854    return VINF_SUCCESS;
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