- Timestamp:
- Sep 5, 2007 1:13:07 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r4524 r4532 147 147 VMMDevReq_GetMemBalloonChangeRequest = 111, 148 148 VMMDevReq_GetStatisticsChangeRequest = 112, 149 VMMDevReq_ChangeMemBalloon = 113, 149 150 VMMDevReq_LogString = 200, 150 151 VMMDevReq_SizeHack = 0x7fffffff … … 404 405 uint32_t eventAck; 405 406 } VMMDevGetMemBalloonChangeRequest; 407 408 /** inflate/deflate memory balloon structure */ 409 typedef struct 410 { 411 /** header */ 412 VMMDevRequestHeader header; 413 uint32_t cPages; 414 uint32_t fInflate; /* true = inflate, false = defalte */ 415 RTGCPHYS aPhysPage[1]; /* variable size */ 416 } VMMDevChangeMemBalloon; 406 417 407 418 /** guest statistics interval change request structure */ … … 1319 1330 case VMMDevReq_GetStatisticsChangeRequest: 1320 1331 return sizeof(VMMDevGetStatisticsChangeRequest); 1332 case VMMDevReq_ChangeMemBalloon: 1333 return sizeof(VMMDevChangeMemBalloon); 1321 1334 case VMMDevReq_LogString: 1322 1335 return sizeof(VMMDevReqLogString); -
trunk/include/VBox/pdmifs.h
r4524 r4532 1593 1593 DECLR3CALLBACKMEMBER(int, pfnReportStatistics,(PPDMIVMMDEVCONNECTOR pInterface, struct VBoxGuestStatistics *pGuestStats)); 1594 1594 1595 /** 1596 * Inflate or deflate the memory balloon 1597 * 1598 * @returns VBox status code. 1599 * @param pInterface Pointer to this interface. 1600 * @param fInflate Inflate or deflate 1601 * @param cPages Number of physical pages (must be 256 as we allocate in 1 MB chunks) 1602 * @param aPhysPage Array of physical page addresses 1603 * @thread The emulation thread. 1604 */ 1605 DECLR3CALLBACKMEMBER(int, pfnChangeMemoryBalloon, (PPDMIVMMDEVCONNECTOR pInterface, bool fInflate, uint32_t cPages, RTGCPHYS *aPhysPage)); 1606 1595 1607 } PDMIVMMDEVCONNECTOR; 1596 1608 -
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r4524 r4532 1201 1201 1202 1202 requestHeader->rc = VINF_SUCCESS; 1203 } 1204 break; 1205 } 1206 1207 case VMMDevReq_ChangeMemBalloon: 1208 { 1209 VMMDevChangeMemBalloon *memBalloonChange = (VMMDevChangeMemBalloon*)requestHeader; 1210 1211 Log(("VMMDevReq_ChangeMemBalloon\n")); 1212 if ( requestHeader->size < sizeof(VMMDevChangeMemBalloon) 1213 || requestHeader->size != RT_OFFSETOF(VMMDevChangeMemBalloon, aPhysPage[memBalloonChange->cPages])) 1214 { 1215 AssertFailed(); 1216 requestHeader->rc = VERR_INVALID_PARAMETER; 1217 } 1218 else 1219 { 1220 requestHeader->rc = pData->pDrv->pfnChangeMemoryBalloon(pData->pDrv, !!memBalloonChange->fInflate, memBalloonChange->cPages, memBalloonChange->aPhysPage); 1203 1221 } 1204 1222 break; -
trunk/src/VBox/Main/VMMDevInterface.cpp
r4513 r4532 425 425 guest->SetStatistic(GuestStatisticType_PageFileSize, pGuestStats->u32PageFileSize); 426 426 427 return VINF_SUCCESS; 428 } 429 430 /** 431 * Inflate or deflate the memory balloon 432 * 433 * @returns VBox status code. 434 * @param pInterface Pointer to this interface. 435 * @param fInflate Inflate or deflate 436 * @param cPages Number of physical pages (must be 256 as we allocate in 1 MB chunks) 437 * @param aPhysPage Array of physical page addresses 438 * @thread The emulation thread. 439 */ 440 DECLCALLBACK(int) vmmdevChangeMemoryBalloon(PPDMIVMMDEVCONNECTOR pInterface, bool fInflate, uint32_t cPages, RTGCPHYS *aPhysPage) 441 { 442 if ( cPages != 256 443 || !aPhysPage) 444 return VERR_INVALID_PARAMETER; 445 446 AssertMsgFailed(("vmmdevChangeMemoryBalloon @todo\n")); 427 447 return VINF_SUCCESS; 428 448 } … … 618 638 pData->Connector.pfnReportStatistics = vmmdevReportStatistics; 619 639 pData->Connector.pfnQueryStatisticsInterval = vmmdevQueryStatisticsInterval; 640 pData->Connector.pfnChangeMemoryBalloon = vmmdevChangeMemoryBalloon; 620 641 621 642 #ifdef VBOX_HGCM
Note:
See TracChangeset
for help on using the changeset viewer.