Changeset 92218 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Nov 4, 2021 7:02:55 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r92177 r92218 3055 3055 * most likely to fail. 3056 3056 */ 3057 int rc = MMR3AdjustFixedReservation(pVM, cPages, pszDesc); 3057 int rc = VINF_SUCCESS; 3058 #ifdef VBOX_WITH_PGM_NEM_MODE 3059 if (!pVM->pgm.s.fNemMode) 3060 #endif 3061 rc = MMR3AdjustFixedReservation(pVM, cPages, pszDesc); 3058 3062 if (RT_SUCCESS(rc)) 3059 3063 { … … 3063 3067 void *pvPages; 3064 3068 #ifndef VBOX_WITH_LINEAR_HOST_PHYS_MEM 3065 RTR0PTR pvPagesR0; 3066 rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, &pvPagesR0, paPages); 3069 RTR0PTR pvPagesR0 = NIL_RTR0PTR; 3070 #endif 3071 3072 #ifdef VBOX_WITH_PGM_NEM_MODE 3073 if (!pVM->pgm.s.fNemMode) 3074 #endif 3075 { 3076 #ifndef VBOX_WITH_LINEAR_HOST_PHYS_MEM 3077 rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, &pvPagesR0, paPages); 3067 3078 #else 3068 rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, NULL /*pR0Ptr*/, paPages); 3079 rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, NULL /*pR0Ptr*/, paPages); 3080 #endif 3081 } 3082 #ifdef VBOX_WITH_PGM_NEM_MODE 3083 else 3084 { 3085 rc = SUPR3PageAlloc(cPages, &pvPages); 3086 if (RT_SUCCESS(rc)) 3087 for (uint32_t i = 0; i < cPages; i++) 3088 paPages[i].Phys = UINT64_C(0x0000fffffffff000); 3089 } 3069 3090 #endif 3070 3091 if (RT_SUCCESS(rc)) … … 3204 3225 */ 3205 3226 uint32_t const cPages = pCur->cbReal >> PAGE_SHIFT; 3206 int rc2 = SUPR3PageFreeEx(pCur->pvR3, cPages); 3207 AssertRC(rc2); 3208 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) 3209 rc = rc2; 3210 3211 rc2 = MMR3AdjustFixedReservation(pVM, -(int32_t)cPages, pCur->RamRange.pszDesc); 3212 AssertRC(rc2); 3213 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) 3214 rc = rc2; 3227 #ifdef VBOX_WITH_PGM_NEM_MODE 3228 if (!pVM->pgm.s.fNemMode) 3229 #endif 3230 { 3231 int rc2 = SUPR3PageFreeEx(pCur->pvR3, cPages); 3232 AssertRC(rc2); 3233 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) 3234 rc = rc2; 3235 3236 rc2 = MMR3AdjustFixedReservation(pVM, -(int32_t)cPages, pCur->RamRange.pszDesc); 3237 AssertRC(rc2); 3238 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) 3239 rc = rc2; 3240 } 3241 #ifdef VBOX_WITH_PGM_NEM_MODE 3242 else 3243 { 3244 int rc2 = SUPR3PageFree(pCur->pvR3, cPages); 3245 AssertRC(rc2); 3246 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) 3247 rc = rc2; 3248 } 3249 #endif 3215 3250 3216 3251 if (pCur->pPhysHandlerR3)
Note:
See TracChangeset
for help on using the changeset viewer.