VirtualBox

Changeset 90981 in vbox


Ignore:
Timestamp:
Aug 29, 2021 12:50:29 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146620
Message:

VMM: Changed pgmLock to pass VINF_SUCCESS to PDMCritSectEnter and removed VMMCALLRING3_PDM_LOCK. bugref:6695

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmapi.h

    r89620 r90981  
    170170                                            PPPDMIBASE ppBase);
    171171VMMR3DECL(void)         PDMR3DmaRun(PVM pVM);
    172 VMMR3_INT_DECL(int)     PDMR3LockCall(PVM pVM);
    173172
    174173VMMR3_INT_DECL(int)     PDMR3VmmDevHeapAlloc(PVM pVM, size_t cbSize, PFNPDMVMMDEVHEAPNOTIFY pfnNotify, RTR3PTR *ppv);
  • trunk/include/VBox/vmm/vmm.h

    r90980 r90981  
    5555    /** Invalid operation.  */
    5656    VMMCALLRING3_INVALID = 0,
    57     /** Acquire the PDM lock. */
    58     VMMCALLRING3_PDM_LOCK,
    5957    /** Acquire the critical section specified as argument.  */
    6058    VMMCALLRING3_PDM_CRIT_SECT_ENTER,
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r90436 r90981  
    301301 * Locks PDM.
    302302 *
    303  * This might call back to Ring-3 in order to deal with lock contention in RC
    304  * and R0.
     303 * This might block.
    305304 *
    306305 * @param   pVM     The cross context VM structure.
     
    308307void pdmLock(PVMCC pVM)
    309308{
    310 #ifdef IN_RING3
    311     int rc = PDMCritSectEnter(pVM, &pVM->pdm.s.CritSect, VERR_IGNORED);
    312     AssertRC(rc);
    313 #else
    314     int rc = PDMCritSectEnter(pVM, &pVM->pdm.s.CritSect, VERR_GENERAL_FAILURE);
    315     if (RT_SUCCESS(rc))
    316     { /* likely */ }
    317     else
    318     {
    319         if (rc == VERR_GENERAL_FAILURE)
    320             rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PDM_LOCK, 0);
    321         PDM_CRITSECT_RELEASE_ASSERT_RC(pVM, &pVM->pdm.s.CritSect, rc);
    322     }
    323 #endif
     309    int rc = PDMCritSectEnter(pVM, &pVM->pdm.s.CritSect, VINF_SUCCESS);
     310    PDM_CRITSECT_RELEASE_ASSERT_RC(pVM, &pVM->pdm.s.CritSect, rc);
    324311}
    325312
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r90980 r90981  
    13941394            switch (pVCpu->vmm.s.enmCallRing3Operation)
    13951395            {
    1396                 case VMMCALLRING3_PDM_LOCK:
    1397                     STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPDMLock);
    1398                     break;
    13991396                case VMMCALLRING3_PGM_POOL_GROW:
    14001397                    STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMPoolGrow);
  • trunk/src/VBox/VMM/VMMR3/PDM.cpp

    r90550 r90981  
    26622662
    26632663/**
    2664  * Service a VMMCALLRING3_PDM_LOCK call.
    2665  *
    2666  * @returns VBox status code.
    2667  * @param   pVM     The cross context VM structure.
    2668  */
    2669 VMMR3_INT_DECL(int) PDMR3LockCall(PVM pVM)
    2670 {
    2671     return PDMR3CritSectEnterEx(pVM, &pVM->pdm.s.CritSect, true /* fHostCall */);
    2672 }
    2673 
    2674 
    2675 /**
    26762664 * Allocates memory from the VMM device heap.
    26772665 *
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r90980 r90981  
    430430    STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchTPR,            STAMTYPE_COUNTER, "/VMM/RZRet/PatchTPR",            STAMUNIT_OCCURENCES, "Number of VINF_EM_HM_PATCH_TPR_INSTR returns.");
    431431    STAM_REG(pVM, &pVM->vmm.s.StatRZRetCallRing3,           STAMTYPE_COUNTER, "/VMM/RZCallR3/Misc",             STAMUNIT_OCCURENCES, "Number of Other ring-3 calls.");
    432     STAM_REG(pVM, &pVM->vmm.s.StatRZCallPDMLock,            STAMTYPE_COUNTER, "/VMM/RZCallR3/PDMLock",          STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PDM_LOCK calls.");
    433432    STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMLock,            STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMLock",          STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_LOCK calls.");
    434433    STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMPoolGrow,        STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMPoolGrow",      STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_POOL_GROW calls.");
     
    25062505    {
    25072506        /*
    2508          * Acquire the PDM lock.
    2509          */
    2510         case VMMCALLRING3_PDM_LOCK:
    2511         {
    2512             pVCpu->vmm.s.rcCallRing3 = PDMR3LockCall(pVM);
    2513             break;
    2514         }
    2515 
    2516         /*
    25172507         * Grow the PGM pool.
    25182508         */
  • trunk/src/VBox/VMM/include/VMMInternal.h

    r90980 r90981  
    414414    STAMCOUNTER                 StatRZRetPGMFlushPending;
    415415    STAMCOUNTER                 StatRZRetPatchTPR;
    416     STAMCOUNTER                 StatRZCallPDMLock;
    417416    STAMCOUNTER                 StatRZCallPGMPoolGrow;
    418417    STAMCOUNTER                 StatRZCallPGMMapChunk;
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