VirtualBox

Changeset 29320 in vbox


Ignore:
Timestamp:
May 11, 2010 9:43:35 AM (15 years ago)
Author:
vboxsync
Message:

VBoxService: Also handle memory ballooning more gentle if not available on the host.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp

    r28800 r29320  
    260260    if (RT_SUCCESS(rc))
    261261    {
    262         VBoxServiceVerbose(3, "VBoxMemBalloonInit: new balloon size %d MB (%s memory)\n",
     262        VBoxServiceVerbose(3, "MemBalloon: New balloon size %d MB (%s memory)\n",
    263263                           cNewChunks, fHandleInR3 ? "R3" : "R0");
    264264        if (fHandleInR3)
     
    268268    }
    269269    else
    270         VBoxServiceVerbose(3, "VBoxMemBalloonInit: VbglR3MemBalloonRefresh failed with %Rrc\n", rc);
    271 
    272     /* We shouldn't fail here if ballooning isn't available. This can have several reasons,
    273      * for instance, host too old  (which is not that fatal). */
    274     return VINF_SUCCESS;
     270    {
     271        if (rc == VERR_INVALID_PARAMETER) /* Host service is not available. */
     272            VBoxServiceVerbose(0, "MemBalloon: Memory ballooning support is not available\n");
     273        else
     274            VBoxServiceVerbose(3, "MemBalloon: VbglR3MemBalloonRefresh failed with %Rrc\n", rc);
     275        RTSemEventMultiDestroy(g_MemBalloonEvent);
     276        g_MemBalloonEvent = NIL_RTSEMEVENTMULTI;
     277
     278        /*
     279         * Not having the guest control service on the host renders this whole service
     280         * unusable, so report that we are not able to continue.
     281         */
     282        rc = VERR_NOT_SUPPORTED;
     283    }
     284
     285    return rc;
    275286}
    276287
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