Changeset 92391 in vbox
- Timestamp:
- Nov 12, 2021 9:47:48 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
include/VBox/vmm/vmm.h (modified) (1 diff)
-
src/VBox/VMM/VMMAll/PGMAllPhys.cpp (modified) (2 diffs)
-
src/VBox/VMM/VMMR0/GMMR0.cpp (modified) (3 diffs)
-
src/VBox/VMM/VMMR0/VMMR0.cpp (modified) (1 diff)
-
src/VBox/VMM/VMMR3/PGMPhys.cpp (modified) (1 diff)
-
src/VBox/VMM/VMMR3/VMM.cpp (modified) (3 diffs)
-
src/VBox/VMM/include/PGMInternal.h (modified) (1 diff)
-
src/VBox/VMM/include/VMMInternal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vmm.h
r92368 r92391 57 57 /** Signal a ring 0 assertion. */ 58 58 VMMCALLRING3_VM_R0_ASSERTION, 59 60 /** Allocates more handy pages. */61 VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES,62 59 /** The usual 32-bit hack. */ 63 60 VMMCALLRING3_32BIT_HACK = 0x7fffffff -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r92371 r92391 759 759 int rc = PGMR3PhysAllocateHandyPages(pVM); 760 760 #else 761 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES, 0);761 int rc = pgmR0PhysAllocateHandyPages(pVM, VMMGetCpuId(pVM), false /*fRing3*/); 762 762 #endif 763 763 if (RT_UNLIKELY(rc != VINF_SUCCESS)) … … 798 798 return VINF_SUCCESS; 799 799 } 800 801 800 802 801 -
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r92368 r92391 2942 2942 2943 2943 /* 2944 * Validate , get basics and take the semaphore.2944 * Validate & get basics. 2945 2945 * (This is a relatively busy path, so make predictions where possible.) 2946 2946 */ … … 2983 2983 } 2984 2984 2985 gmmR0MutexAcquire(pGMM); 2986 if (GMM_CHECK_SANITY_UPON_ENTERING(pGMM)) 2985 /* 2986 * Take the semaphore 2987 */ 2988 VMMR0EMTBLOCKCTX Ctx; 2989 PGVMCPU pGVCpu = &pGVM->aCpus[idCpu]; 2990 rc = VMMR0EmtPrepareToBlock(pGVCpu, VINF_SUCCESS, "GMMR0AllocateHandyPages", pGMM, &Ctx); 2991 AssertRCReturn(rc, rc); 2992 2993 rc = gmmR0MutexAcquire(pGMM); 2994 if ( RT_SUCCESS(rc) 2995 && GMM_CHECK_SANITY_UPON_ENTERING(pGMM)) 2987 2996 { 2988 2997 /* No allocations before the initial reservation has been made! */ … … 3105 3114 rc = VERR_WRONG_ORDER; 3106 3115 GMM_CHECK_SANITY_UPON_LEAVING(pGMM); 3107 } 3108 else 3116 gmmR0MutexRelease(pGMM); 3117 } 3118 else if (RT_SUCCESS(rc)) 3119 { 3120 gmmR0MutexRelease(pGMM); 3109 3121 rc = VERR_GMM_IS_NOT_SANE; 3110 gmmR0MutexRelease(pGMM); 3122 } 3123 VMMR0EmtResumeAfterBlocking(pGVCpu, &Ctx); 3124 3111 3125 LogFlow(("GMMR0AllocateHandyPages: returns %Rrc\n", rc)); 3112 3126 return rc; -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r92368 r92391 1294 1294 switch (pVCpu->vmm.s.enmCallRing3Operation) 1295 1295 { 1296 case VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES:1297 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMAllocHandy);1298 break;1299 1296 case VMMCALLRING3_VM_R0_ASSERTION: 1300 1297 default: -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r92390 r92391 5815 5815 5816 5816 /** 5817 * Response to VM_FF_PGM_NEED_HANDY_PAGES and VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES.5817 * Response to VM_FF_PGM_NEED_HANDY_PAGES and helper for pgmPhysEnsureHandyPage. 5818 5818 * 5819 5819 * This function will also work the VM_FF_PGM_NO_MEMORY force action flag, to 5820 * signal and clear the out of memory condition. When contracted, this API is5821 * usedto try clear the condition when the user wants to resume.5820 * signal and clear the out of memory condition. When called, this API is used 5821 * to try clear the condition when the user wants to resume. 5822 5822 * 5823 5823 * @returns The following VBox status codes. -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r92368 r92391 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.StatRZCallPGMAllocHandy, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMAllocHandy", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES calls.");433 432 434 433 STAMR3Register(pVM, &pVM->vmm.s.StatLogFlusherFlushes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, "/VMM/LogFlush/00-Flushes", STAMUNIT_OCCURENCES, "Total number of buffer flushes"); … … 2500 2499 { 2501 2500 /* 2502 * Allocates more handy pages.2503 */2504 case VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES:2505 {2506 pVCpu->vmm.s.rcCallRing3 = PGMR3PhysAllocateHandyPages(pVM);2507 break;2508 }2509 2510 /*2511 2501 * Signal a ring 0 hypervisor assertion. 2512 2502 * Cancel the longjmp operation that's in progress. … … 2531 2521 return VERR_VMM_UNKNOWN_RING3_CALL; 2532 2522 } 2533 2534 pVCpu->vmm.s.enmCallRing3Operation = VMMCALLRING3_INVALID;2535 return VINF_SUCCESS;2536 2523 } 2537 2524 -
trunk/src/VBox/VMM/include/PGMInternal.h
r92385 r92391 3812 3812 int pgmPhysAllocLargePage(PVMCC pVM, RTGCPHYS GCPhys); 3813 3813 #ifdef IN_RING0 3814 int pgmR0PhysAllocateHandyPages(PGVM pGVM, VMCPUID idCpu, bool fRing3); 3814 3815 int pgmR0PhysAllocateLargePage(PGVM pGVM, VMCPUID idCpu, RTGCPHYS GCPhys); 3815 3816 #endif -
trunk/src/VBox/VMM/include/VMMInternal.h
r91245 r92391 414 414 STAMCOUNTER StatRZRetPGMFlushPending; 415 415 STAMCOUNTER StatRZRetPatchTPR; 416 STAMCOUNTER StatRZCallPGMAllocHandy;417 416 /** @} */ 418 417 } VMM;
Note:
See TracChangeset
for help on using the changeset viewer.

