Changeset 28051 in vbox
- Timestamp:
- Apr 7, 2010 2:09:14 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmifs.h
r27965 r28051 2197 2197 DECLR3CALLBACKMEMBER(int, pfnReportStatistics,(PPDMIVMMDEVCONNECTOR pInterface, struct VBoxGuestStatistics *pGuestStats)); 2198 2198 2199 /** 2200 * Query the current balloon size 2201 * 2202 * @returns VBox status code. 2203 * @param pInterface Pointer to this interface. 2204 * @param pcbBalloon Balloon size 2205 * @thread The emulation thread. 2206 */ 2207 DECLR3CALLBACKMEMBER(int, pfnQueryBalloonSize,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcbBalloon)); 2208 2199 2209 } PDMIVMMDEVCONNECTOR; 2200 2210 /** PDMIVMMDEVCONNECTOR interface ID. */ -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r27970 r28051 2764 2764 } 2765 2765 #endif 2766 /* Query the initial balloon size. */ 2767 rc = pThis->pDrv->pfnQueryBalloonSize(pThis->pDrv, &pThis->u32MemoryBalloonSize); 2768 AssertRC(rc); 2769 Log(("Initial balloon size %x\n", pThis->u32MemoryBalloonSize)); 2766 2770 } 2767 2771 else if (rc == VERR_PDM_NO_ATTACHED_DRIVER) -
trunk/src/VBox/Main/GuestImpl.cpp
r28049 r28051 84 84 HRESULT ret = mParent->machine()->COMGETTER(MemoryBalloonSize)(&aMemoryBalloonSize); 85 85 if (ret == S_OK) 86 {87 86 mMemoryBalloonSize = aMemoryBalloonSize; 88 89 if (mMemoryBalloonSize)90 {91 /* forward the information to the VMM device */92 VMMDev *vmmDev = mParent->getVMMDev();93 if (vmmDev)94 vmmDev->getVMMDevPort()->pfnSetMemoryBalloon(vmmDev->getVMMDevPort(), aMemoryBalloonSize);95 }96 }97 87 else 98 88 mMemoryBalloonSize = 0; /* Default is no ballooning */ -
trunk/src/VBox/Main/VMMDevInterface.cpp
r27971 r28051 433 433 guest->COMGETTER(StatisticsUpdateInterval)(&val); 434 434 *pulInterval = val; 435 return VINF_SUCCESS; 436 } 437 438 /** 439 * Query the current balloon size 440 * 441 * @returns VBox status code. 442 * @param pInterface Pointer to this interface. 443 * @param pcbBalloon Balloon size 444 * @thread The emulation thread. 445 */ 446 DECLCALLBACK(int) vmmdevQueryBalloonSize(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcbBalloon) 447 { 448 PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); 449 ULONG val = 0; 450 451 if (!pcbBalloon) 452 return VERR_INVALID_POINTER; 453 454 /* store that information in IGuest */ 455 Guest* guest = pDrv->pVMMDev->getParent()->getGuest(); 456 Assert(guest); 457 if (!guest) 458 return VERR_INVALID_PARAMETER; /** @todo wrong error */ 459 460 guest->COMGETTER(MemoryBalloonSize)(&val); 461 *pcbBalloon = val; 435 462 return VINF_SUCCESS; 436 463 } … … 691 718 pData->Connector.pfnReportStatistics = vmmdevReportStatistics; 692 719 pData->Connector.pfnQueryStatisticsInterval = vmmdevQueryStatisticsInterval; 720 pData->Connector.pfnQueryBalloonSize = vmmdevQueryBalloonSize; 693 721 694 722 #ifdef VBOX_WITH_HGCM
Note:
See TracChangeset
for help on using the changeset viewer.