Changeset 90981 in vbox
- Timestamp:
- Aug 29, 2021 12:50:29 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146620
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmapi.h
r89620 r90981 170 170 PPPDMIBASE ppBase); 171 171 VMMR3DECL(void) PDMR3DmaRun(PVM pVM); 172 VMMR3_INT_DECL(int) PDMR3LockCall(PVM pVM);173 172 174 173 VMMR3_INT_DECL(int) PDMR3VmmDevHeapAlloc(PVM pVM, size_t cbSize, PFNPDMVMMDEVHEAPNOTIFY pfnNotify, RTR3PTR *ppv); -
trunk/include/VBox/vmm/vmm.h
r90980 r90981 55 55 /** Invalid operation. */ 56 56 VMMCALLRING3_INVALID = 0, 57 /** Acquire the PDM lock. */58 VMMCALLRING3_PDM_LOCK,59 57 /** Acquire the critical section specified as argument. */ 60 58 VMMCALLRING3_PDM_CRIT_SECT_ENTER, -
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r90436 r90981 301 301 * Locks PDM. 302 302 * 303 * This might call back to Ring-3 in order to deal with lock contention in RC 304 * and R0. 303 * This might block. 305 304 * 306 305 * @param pVM The cross context VM structure. … … 308 307 void pdmLock(PVMCC pVM) 309 308 { 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); 324 311 } 325 312 -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r90980 r90981 1394 1394 switch (pVCpu->vmm.s.enmCallRing3Operation) 1395 1395 { 1396 case VMMCALLRING3_PDM_LOCK:1397 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPDMLock);1398 break;1399 1396 case VMMCALLRING3_PGM_POOL_GROW: 1400 1397 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMPoolGrow); -
trunk/src/VBox/VMM/VMMR3/PDM.cpp
r90550 r90981 2662 2662 2663 2663 /** 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 /**2676 2664 * Allocates memory from the VMM device heap. 2677 2665 * -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r90980 r90981 430 430 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchTPR, STAMTYPE_COUNTER, "/VMM/RZRet/PatchTPR", STAMUNIT_OCCURENCES, "Number of VINF_EM_HM_PATCH_TPR_INSTR returns."); 431 431 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.");433 432 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMLock, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMLock", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_LOCK calls."); 434 433 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMPoolGrow, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMPoolGrow", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_POOL_GROW calls."); … … 2506 2505 { 2507 2506 /* 2508 * Acquire the PDM lock.2509 */2510 case VMMCALLRING3_PDM_LOCK:2511 {2512 pVCpu->vmm.s.rcCallRing3 = PDMR3LockCall(pVM);2513 break;2514 }2515 2516 /*2517 2507 * Grow the PGM pool. 2518 2508 */ -
trunk/src/VBox/VMM/include/VMMInternal.h
r90980 r90981 414 414 STAMCOUNTER StatRZRetPGMFlushPending; 415 415 STAMCOUNTER StatRZRetPatchTPR; 416 STAMCOUNTER StatRZCallPDMLock;417 416 STAMCOUNTER StatRZCallPGMPoolGrow; 418 417 STAMCOUNTER StatRZCallPGMMapChunk;
Note:
See TracChangeset
for help on using the changeset viewer.