Changeset 29589 in vbox for trunk/src/VBox
- Timestamp:
- May 18, 2010 6:55:00 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestImpl.cpp
r29584 r29589 84 84 mMemoryBalloonSize = 0; /* Default is no ballooning */ 85 85 86 BOOL fPageFusionEnabled; 87 ret = mParent->machine()->COMGETTER(PageFusionEnabled)(&fPageFusionEnabled); 88 if (ret == S_OK) 89 mfPageFusionEnabled = fPageFusionEnabled; 90 else 91 mfPageFusionEnabled = false; /* Default is no page fusion*/ 92 86 93 mStatUpdateInterval = 0; /* Default is not to report guest statistics at all */ 87 94 … … 204 211 205 212 *aSupportsGraphics = mData.mSupportsGraphics; 213 214 return S_OK; 215 } 216 217 STDMETHODIMP Guest::COMGETTER(PageFusionEnabled) (BOOL *aPageFusionEnabled) 218 { 219 CheckComArgOutPointerValid(aPageFusionEnabled); 220 221 AutoCaller autoCaller(this); 222 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 223 224 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 225 226 *aPageFusionEnabled = mfPageFusionEnabled; 206 227 207 228 return S_OK; -
trunk/src/VBox/Main/VMMDevInterface.cpp
r29542 r29589 490 490 guest->COMGETTER(MemoryBalloonSize)(&val); 491 491 *pcbBalloon = val; 492 return VINF_SUCCESS; 493 } 494 495 /** 496 * Query the current page fusion setting 497 * 498 * @returns VBox status code. 499 * @param pInterface Pointer to this interface. 500 * @param pfPageFusionEnabled Pointer to boolean 501 * @thread The emulation thread. 502 */ 503 DECLCALLBACK(int) vmmdevIsPageFusionEnabled(PPDMIVMMDEVCONNECTOR pInterface, bool *pfPageFusionEnabled) 504 { 505 PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); 506 BOOL val = 0; 507 508 if (!pfPageFusionEnabled) 509 return VERR_INVALID_POINTER; 510 511 /* store that information in IGuest */ 512 Guest* guest = pDrv->pVMMDev->getParent()->getGuest(); 513 Assert(guest); 514 if (!guest) 515 return VERR_INVALID_PARAMETER; /** @todo wrong error */ 516 517 guest->COMGETTER(PageFusionEnabled)(&val); 518 *pfPageFusionEnabled = !!val; 492 519 return VINF_SUCCESS; 493 520 } … … 749 776 pData->Connector.pfnQueryStatisticsInterval = vmmdevQueryStatisticsInterval; 750 777 pData->Connector.pfnQueryBalloonSize = vmmdevQueryBalloonSize; 778 pData->Connector.pfnIsPageFusionEnabled = vmmdevIsPageFusionEnabled; 751 779 752 780 #ifdef VBOX_WITH_HGCM -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r29518 r29589 8403 8403 <interface 8404 8404 name="IGuestOSType" extends="$unknown" 8405 uuid=" 8aa950f6-668c-4388-b251-3809b404e862"8405 uuid="e3f6727e-a09b-41ea-a824-864a176472f3" 8406 8406 wsmap="struct" 8407 8407 > … … 8560 8560 <attribute name="memoryBalloonSize" type="unsigned long"> 8561 8561 <desc>Guest system memory balloon size in megabytes (transient property).</desc> 8562 </attribute> 8563 8564 <attribute name="pageFusionEnabled" type="boolean" readonly="yes"> 8565 <desc>Flag whether page fusion is enabled or not.</desc> 8562 8566 </attribute> 8563 8567 -
trunk/src/VBox/Main/include/GuestImpl.h
r29516 r29589 82 82 STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize); 83 83 STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize); 84 STDMETHOD(COMGETTER(PageFusionEnabled)) (BOOL *aPageFusionEnabled); 84 85 STDMETHOD(COMGETTER(StatisticsUpdateInterval)) (ULONG *aUpdateInterval); 85 86 STDMETHOD(COMSETTER(StatisticsUpdateInterval)) (ULONG aUpdateInterval); … … 169 170 ULONG mStatUpdateInterval; 170 171 ULONG mCurrentGuestStat[GUESTSTATTYPE_MAX]; 172 BOOL mfPageFusionEnabled; 171 173 172 174 Console *mParent;
Note:
See TracChangeset
for help on using the changeset viewer.