Changeset 34318 in vbox
- Timestamp:
- Nov 24, 2010 12:57:17 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMPhys.cpp
r34167 r34318 4116 4116 * Frees the specified RAM page and replaces it with the ZERO page. 4117 4117 * 4118 * This is used by ballooning, remapping MMIO2 and RAM reset. 4119 * 4120 * @param pVM Pointer to the shared VM structure. 4121 * @param pReq Pointer to the request. 4122 * @param pPage Pointer to the page structure. 4123 * @param GCPhys The guest physical address of the page, if applicable. 4118 * This is used by ballooning, remapping MMIO2, RAM reset and state loading. 4119 * 4120 * @param pVM Pointer to the shared VM structure. 4121 * @param pReq Pointer to the request. 4122 * @param pcPendingPages Where the number of pages waiting to be freed are 4123 * kept. This will normally be incremented. 4124 * @param pPage Pointer to the page structure. 4125 * @param GCPhys The guest physical address of the page, if applicable. 4124 4126 * 4125 4127 * @remarks The caller must own the PGM lock. -
trunk/src/VBox/VMM/PGMSavedState.cpp
r33780 r34318 2578 2578 /* 2579 2579 * We batch up pages that should be freed instead of calling GMM for 2580 * each and every one of them. 2580 * each and every one of them. Note that we'll lose the pages in most 2581 * failure paths - this should probably be addressed one day. 2581 2582 */ 2582 2583 uint32_t cPendingPages = 0; … … 2645 2646 AssertLogRelMsgReturn(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_ALLOCATED, ("GCPhys=%RGp %R[pgmpage]\n", GCPhys, pPage), VERR_INTERNAL_ERROR_5); 2646 2647 2647 /* Free it only if it's not part of a previously allocated large page. */ 2648 if (PGM_PAGE_GET_PDE_TYPE(pPage) != PGM_PAGE_PDE_TYPE_PDE) 2648 /* If this is a ROM page, we must clear it and not try 2649 free it... */ 2650 if ( PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_ROM 2651 || PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_ROM_SHADOW) 2649 2652 { 2650 /* Allocated before (prealloc), so free it now. */ 2653 void *pvDstPage; 2654 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, &pvDstPage); 2655 AssertLogRelMsgRCReturn(rc, ("GCPhys=%RGp %R[pgmpage] rc=%Rrc\n", GCPhys, pPage, rc), rc); 2656 ASMMemZeroPage(pvDstPage); 2657 } 2658 /* Free it only if it's not part of a previously 2659 allocated large page (no need to clear the page). */ 2660 else if (PGM_PAGE_GET_PDE_TYPE(pPage) != PGM_PAGE_PDE_TYPE_PDE) 2661 { 2651 2662 rc = pgmPhysFreePage(pVM, pReq, &cPendingPages, pPage, GCPhys); 2652 AssertRC (rc);2663 AssertRCReturn(rc, rc); 2653 2664 } 2654 2665 break; … … 2993 3004 { 2994 3005 rc = GMMR3BalloonedPages(pVM, GMMBALLOONACTION_INFLATE, pVM->pgm.s.cBalloonedPages); 2995 AssertRC (rc);3006 AssertRCReturn(rc, rc); 2996 3007 } 2997 3008 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.