Changeset 26350 in vbox
- Timestamp:
- Feb 9, 2010 9:21:38 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmifs.h
r26300 r26350 2082 2082 DECLR3CALLBACKMEMBER(int, pfnReportStatistics,(PPDMIVMMDEVCONNECTOR pInterface, struct VBoxGuestStatistics *pGuestStats)); 2083 2083 2084 /**2085 * Inflate or deflate the memory balloon2086 *2087 * @returns VBox status code.2088 * @param pInterface Pointer to this interface.2089 * @param fInflate Inflate or deflate2090 * @param cPages Number of physical pages (must be 256 as we allocate in 1 MB chunks)2091 * @param aPhysPage Array of physical page addresses2092 * @thread The emulation thread.2093 */2094 DECLR3CALLBACKMEMBER(int, pfnChangeMemoryBalloon, (PPDMIVMMDEVCONNECTOR pInterface, bool fInflate, uint32_t cPages, RTGCPHYS *aPhysPage));2095 2096 2084 } PDMIVMMDEVCONNECTOR; 2097 2085 /** PDMIVMMDEVCONNECTOR interface ID. */ 2098 #define PDMIVMMDEVCONNECTOR_IID " 38b96194-ee83-489e-b92e-73ee28a29439"2086 #define PDMIVMMDEVCONNECTOR_IID "5c35e324-2b02-49b7-a613-119fbf3320a9" 2099 2087 2100 2088 -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r26295 r26350 1387 1387 else 1388 1388 { 1389 pRequestHeader->rc = pThis->pDrv->pfnChangeMemoryBalloon(pThis->pDrv, !!memBalloonChange->fInflate, memBalloonChange->cPages, memBalloonChange->aPhysPage); 1389 if (memBalloonChange->fInflate) 1390 pRequestHeader->rc = PGMR3PhysFreeRamPages(PDMDevHlpGetVM(pDevIns), memBalloonChange->cPages, memBalloonChange->aPhysPage); 1391 else 1392 pRequestHeader->rc = VINF_SUCCESS; /* deflating the balloon doesn't require any action; when the reacquired memory is touched, it will be paged back in. */ 1390 1393 } 1391 1394 break; -
trunk/src/VBox/Main/VMMDevInterface.cpp
r26295 r26350 512 512 guest->SetStatistic(pGuestStats->u32CpuId, GuestStatisticType_SampleNumber, sample+1); 513 513 514 return VINF_SUCCESS;515 }516 517 /**518 * Inflate or deflate the memory balloon519 *520 * @returns VBox status code.521 * @param pInterface Pointer to this interface.522 * @param fInflate Inflate or deflate523 * @param cPages Number of physical pages (must be 256 as we allocate in 1 MB chunks)524 * @param aPhysPage Array of physical page addresses525 * @thread The emulation thread.526 */527 DECLCALLBACK(int) vmmdevChangeMemoryBalloon(PPDMIVMMDEVCONNECTOR pInterface, bool fInflate, uint32_t cPages, RTGCPHYS *aPhysPage)528 {529 if ( cPages != VMMDEV_MEMORY_BALLOON_CHUNK_PAGES530 || !aPhysPage)531 return VERR_INVALID_PARAMETER;532 533 Log(("vmmdevChangeMemoryBalloon @todo\n"));534 514 return VINF_SUCCESS; 535 515 } … … 737 717 pData->Connector.pfnReportStatistics = vmmdevReportStatistics; 738 718 pData->Connector.pfnQueryStatisticsInterval = vmmdevQueryStatisticsInterval; 739 pData->Connector.pfnChangeMemoryBalloon = vmmdevChangeMemoryBalloon;740 719 741 720 #ifdef VBOX_WITH_HGCM
Note:
See TracChangeset
for help on using the changeset viewer.