VirtualBox

Changeset 29589 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 18, 2010 6:55:00 AM (15 years ago)
Author:
vboxsync
Message:

Connect page fusion state

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/GuestImpl.cpp

    r29584 r29589  
    8484        mMemoryBalloonSize = 0;                     /* Default is no ballooning */
    8585
     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
    8693    mStatUpdateInterval = 0;                    /* Default is not to report guest statistics at all */
    8794
     
    204211
    205212    *aSupportsGraphics = mData.mSupportsGraphics;
     213
     214    return S_OK;
     215}
     216
     217STDMETHODIMP 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;
    206227
    207228    return S_OK;
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r29542 r29589  
    490490    guest->COMGETTER(MemoryBalloonSize)(&val);
    491491    *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 */
     503DECLCALLBACK(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;
    492519    return VINF_SUCCESS;
    493520}
     
    749776    pData->Connector.pfnQueryStatisticsInterval       = vmmdevQueryStatisticsInterval;
    750777    pData->Connector.pfnQueryBalloonSize              = vmmdevQueryBalloonSize;
     778    pData->Connector.pfnIsPageFusionEnabled           = vmmdevIsPageFusionEnabled;
    751779
    752780#ifdef VBOX_WITH_HGCM
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r29518 r29589  
    84038403  <interface
    84048404    name="IGuestOSType" extends="$unknown"
    8405     uuid="8aa950f6-668c-4388-b251-3809b404e862"
     8405    uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
    84068406    wsmap="struct"
    84078407  >
     
    85608560    <attribute name="memoryBalloonSize" type="unsigned long">
    85618561      <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>
    85628566    </attribute>
    85638567
  • trunk/src/VBox/Main/include/GuestImpl.h

    r29516 r29589  
    8282    STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
    8383    STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize);
     84    STDMETHOD(COMGETTER(PageFusionEnabled)) (BOOL *aPageFusionEnabled);
    8485    STDMETHOD(COMGETTER(StatisticsUpdateInterval)) (ULONG *aUpdateInterval);
    8586    STDMETHOD(COMSETTER(StatisticsUpdateInterval)) (ULONG aUpdateInterval);
     
    169170    ULONG mStatUpdateInterval;
    170171    ULONG mCurrentGuestStat[GUESTSTATTYPE_MAX];
     172    BOOL  mfPageFusionEnabled;
    171173
    172174    Console *mParent;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette