VirtualBox

Changeset 29307 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
May 10, 2010 3:18:22 PM (15 years ago)
Author:
vboxsync
Message:

Shared paging interface updates

Location:
trunk/src/VBox/Additions/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp

    r28800 r29307  
    6161    pReq->cbModule      = cbModule;
    6262    pReq->cRegions      = cRegions;
     63#ifdef RT_OS_WINDOWS
     64# if ARCH_BITS == 32
     65    pReq->enmGuestOS    = VBOXOSFAMILY_Windows32;
     66# else
     67    pReq->enmGuestOS    = VBOXOSFAMILY_Windows64;
     68# endif
     69#else
     70    /** todo */
     71    pReq->enmGuestOS    = VBOXOSFAMILY_unknown;
     72#endif
    6373    for (unsigned i = 0; i < cRegions; i++)
    6474        pReq->aRegions[i] = pRegions[i];
     
    105115
    106116/**
    107  * Checks regsitered modules for shared pages
     117 * Checks registered modules for shared pages
    108118 *
    109119 * @returns IPRT status code.
     
    117127}
    118128
     129/**
     130 * Checks if page sharing is enabled.
     131 *
     132 * @returns true/false enabled/disabled
     133 */
     134VBGLR3DECL(bool) VbglR3PageSharingIsEnabled()
     135{
     136    VMMDevPageSharingStatusRequest Req;
     137
     138    vmmdevInitRequest(&Req.header, VMMDevReq_GetPageSharingStatus);
     139    int rc = vbglR3GRPerform(&Req.header);
     140    if (RT_SUCCESS(rc))
     141        return Req.fEnabled;
     142    return false;
     143}
     144
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp

    r28800 r29307  
    337337    AssertRCReturn(rc, rc);
    338338
    339     /* @todo check if page sharing is active. */
    340339    /* @todo report system name and version */
    341340    /* Never fail here. */
     
    358357    {
    359358
    360         VBoxServicePageSharingInspectGuest();
     359        if (VbglR3PageSharingIsEnabled())
     360            VBoxServicePageSharingInspectGuest();
    361361
    362362        /*
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