Changeset 27182 in vbox
- Timestamp:
- Mar 8, 2010 5:28:01 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r27163 r27182 1574 1574 STAM_REL_REG(pVM, &pPGM->cWriteLockedPages, STAMTYPE_U32, "/PGM/Page/cWriteLockedPages", STAMUNIT_COUNT, "The number of write(/read) locked pages."); 1575 1575 STAM_REL_REG(pVM, &pPGM->cReadLockedPages, STAMTYPE_U32, "/PGM/Page/cReadLockedPages", STAMUNIT_COUNT, "The number of read (only) locked pages."); 1576 STAM_REL_REG(pVM, &pPGM->cBalloonedPages, STAMTYPE_U32, "/PGM/Page/cBalloonedPages", STAMUNIT_COUNT, "The number of ballooned pages."); 1576 1577 STAM_REL_REG(pVM, &pPGM->cHandyPages, STAMTYPE_U32, "/PGM/Page/cHandyPages", STAMUNIT_COUNT, "The number of handy pages (not included in cAllPages)."); 1577 1578 STAM_REL_REG(pVM, &pPGM->cRelocations, STAMTYPE_COUNTER, "/PGM/cRelocations", STAMUNIT_OCCURENCES,"Number of hypervisor relocations."); -
trunk/src/VBox/VMM/PGMInternal.h
r27163 r27182 2782 2782 uint32_t cWriteLockedPages; /**< The number of write locked pages. */ 2783 2783 uint32_t cReadLockedPages; /**< The number of read locked pages. */ 2784 uint32_t cBalloonedPages; /**< The number of ballooned pages. */ 2784 2785 2785 2786 /** The number of times we were forced to change the hypervisor region location. */ -
trunk/src/VBox/VMM/PGMPhys.cpp
r27173 r27182 843 843 /* Notify GMM about the balloon change. */ 844 844 rc = GMMR3BalloonedPages(pVM, (fInflate) ? GMMBALLOONACTION_INFLATE : GMMBALLOONACTION_DEFLATE, cPages); 845 if (RT_SUCCESS(rc)) 846 { 847 if (!fInflate) 848 { 849 Assert(pVM->pgm.s.cBalloonedPages >= cPages); 850 pVM->pgm.s.cBalloonedPages -= cPages; 851 } 852 else 853 pVM->pgm.s.cBalloonedPages += cPages; 854 } 855 845 856 pgmUnlock(pVM); 846 857 AssertLogRelRC(rc); -
trunk/src/VBox/VMM/PGMSavedState.cpp
r26165 r27182 51 51 /** Saved state data unit version. 52 52 * @todo remove the guest mappings from the saved state at next version change! */ 53 #define PGM_SAVED_STATE_VERSION 11 53 #define PGM_SAVED_STATE_VERSION 12 54 /** Saved state before the balloon change. */ 55 #define PGM_SAVED_STATE_VERSION_PRE_BALLOON 11 54 56 /** Saved state data unit version used during 3.1 development, misses the RAM 55 57 * config. */ … … 114 116 /** A20 gate mask. 115 117 * Our current approach to A20 emulation is to let REM do it and don't bother 116 * anywhere else. The interesting Guests will be operating with it enabled anyway.117 * But whould need arrise, we'll subject physical addresses to this mask. */118 * anywhere else. The interesting guests will be operating with it enabled anyway. 119 * But should the need arise, we'll subject physical addresses to this mask. */ 118 120 RTGCPHYS GCPhysA20Mask; 119 121 /** A20 gate state - boolean! */ … … 128 130 *******************************************************************************/ 129 131 /** PGM fields to save/load. */ 132 130 133 static const SSMFIELD s_aPGMFields[] = 131 134 { … … 133 136 SSMFIELD_ENTRY_GCPTR( PGM, GCPtrMappingFixed), 134 137 SSMFIELD_ENTRY( PGM, cbMappingFixed), 138 SSMFIELD_ENTRY( PGM, cBalloonedPages), 139 SSMFIELD_ENTRY_TERM() 140 }; 141 142 static const SSMFIELD s_aPGMFieldsPreBalloon[] = 143 { 144 SSMFIELD_ENTRY( PGM, fMappingsFixed), 145 SSMFIELD_ENTRY_GCPTR( PGM, GCPtrMappingFixed), 146 SSMFIELD_ENTRY( PGM, cbMappingFixed), 147 SSMFIELD_ENTRY( PGM, cBalloonedPages), 135 148 SSMFIELD_ENTRY_TERM() 136 149 }; … … 2755 2768 if (uVersion >= PGM_SAVED_STATE_VERSION_3_0_0) 2756 2769 { 2757 rc = SSMR3GetStruct(pSSM, pPGM, &s_aPGMFields[0]); 2770 if (uVersion > PGM_SAVED_STATE_VERSION_PRE_BALLOON) 2771 { 2772 rc = SSMR3GetStruct(pSSM, pPGM, &s_aPGMFields[0]); 2773 if ( RT_SUCCESS(rc) 2774 && pVM->pgm.s.cBalloonedPages) 2775 { 2776 rc = GMMR3BalloonedPages(pVM, GMMBALLOONACTION_INFLATE, pVM->pgm.s.cBalloonedPages); 2777 AssertRC(rc); 2778 } 2779 } 2780 else 2781 rc = SSMR3GetStruct(pSSM, pPGM, &s_aPGMFieldsPreBalloon[0]); 2782 2758 2783 AssertLogRelRCReturn(rc, rc); 2759 2784 … … 2885 2910 if ( ( uPass != SSM_PASS_FINAL 2886 2911 && uVersion != PGM_SAVED_STATE_VERSION 2912 && uVersion != PGM_SAVED_STATE_VERSION_PRE_BALLOON 2887 2913 && uVersion != PGM_SAVED_STATE_VERSION_NO_RAM_CFG) 2888 2914 || ( uVersion != PGM_SAVED_STATE_VERSION 2915 && uVersion != PGM_SAVED_STATE_VERSION_PRE_BALLOON 2889 2916 && uVersion != PGM_SAVED_STATE_VERSION_NO_RAM_CFG 2890 2917 && uVersion != PGM_SAVED_STATE_VERSION_3_0_0 -
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r27162 r27182 2838 2838 * 2839 2839 * The request may or may not have been initiated by the GMM. If it was initiated 2840 * by the GMM it is important that this function is called even if no pages w as2840 * by the GMM it is important that this function is called even if no pages were 2841 2841 * ballooned. 2842 2842 * 2843 2843 * @returns VBox status code: 2844 2844 * @retval VERR_GMM_ATTEMPT_TO_FREE_TOO_MUCH 2845 * @retval VERR_GMM_ATTEMPT_TO_DEFLATE_TOO_MUCH 2845 * @retval VERR_GMM_ATTEMPT_TO_DEFLATE_TOO_MUCH 2846 2846 * @retval VERR_GMM_OVERCOMMITED_TRY_AGAIN_IN_A_BIT - reset condition 2847 * indicating that we won't nece essarily have sufficient RAM to boot2847 * indicating that we won't necessarily have sufficient RAM to boot 2848 2848 * the VM again and that it should pause until this changes (we'll try 2849 2849 * balloon some other VM). (For standard deflate we have little choice
Note:
See TracChangeset
for help on using the changeset viewer.