VirtualBox

Ignore:
Timestamp:
Feb 17, 2015 3:19:35 PM (10 years ago)
Author:
vboxsync
Message:

VBoxGuest.cpp: Partly back out of r92834 because everything shouldn't be LogFlow, nor LogFlowFunc.

File:
1 edited

Legend:

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

    r53434 r54237  
    55
    66/*
    7  * Copyright (C) 2007-2014 Oracle Corporation
     7 * Copyright (C) 2007-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    361361     */
    362362    if (pReq->hypervisorSize == 0)
    363         LogFlowFunc(("Nothing to do\n"));
     363        Log(("vboxGuestInitFixateGuestMappings: nothing to do\n"));
    364364    else
    365365    {
     
    373373        uint32_t    iTry;
    374374        bool        fBitched = false;
    375         LogFlowFunc(("cbHypervisor=%#x\n", cbHypervisor));
     375        Log(("vboxGuestInitFixateGuestMappings: cbHypervisor=%#x\n", cbHypervisor));
    376376        for (iTry = 0; iTry < RT_ELEMENTS(ahTries); iTry++)
    377377        {
     
    765765        rc = VBoxGuestReportDriverStatus(true /* Driver is active */);
    766766        if (RT_FAILURE(rc))
    767             LogFlowFunc(("Could not report guest driver status, rc=%Rrc\n", rc));
     767            Log(("VBoxGuestReinitDevExtAfterHibernation: could not report guest driver status, rc=%Rrc\n", rc));
    768768    }
    769769    else
    770         LogFlowFunc(("Could not report guest information to host, rc=%Rrc\n", rc));
    771 
    772     LogFlowFunc(("Returned with rc=%Rrc\n", rc));
     770        Log(("VBoxGuestReinitDevExtAfterHibernation: could not report guest information to host, rc=%Rrc\n", rc));
     771    LogFlow(("VBoxGuestReinitDevExtAfterHibernation: returned with rc=%Rrc\n", rc));
    773772    return rc;
    774773}
     
    873872            else
    874873            {
    875                 LogFlowFunc(("Inflating failed, rc=%Rrc\n", rc));
     874                Log(("vboxGuestSetBalloonSize(inflate): failed, rc=%Rrc!\n", rc));
    876875                RTR0MemObjFree(*pMemObj, true);
    877876                *pMemObj = NIL_RTR0MEMOBJ;
     
    885884            pDevExt->MemBalloon.cChunks--;
    886885        else
    887             LogFlowFunc(("Deflating failed, rc=%Rrc\n", rc));
     886            Log(("vboxGuestSetBalloonSize(deflate): failed, rc=%Rrc!\n", rc));
    888887    }
    889888
     
    920919                    if (RT_FAILURE(rc))
    921920                    {
    922                         LogRelFunc(("Deflating balloon failed with rc=%Rrc; will leak %u chunks\n",
    923                                     rc, pDevExt->MemBalloon.cChunks));
     921                        LogRel(("vboxGuestCloseMemBalloon: Deflate failed with rc=%Rrc.  Will leak %u chunks.\n",
     922                                rc, pDevExt->MemBalloon.cChunks));
    924923                        break;
    925924                    }
     
    930929            }
    931930            else
    932                 LogRelFunc(("Failed to allocate VMMDev request buffer, rc=%Rrc; will leak %u chunks\n",
    933                             rc, pDevExt->MemBalloon.cChunks));
     931                LogRel(("vboxGuestCloseMemBalloon: Failed to allocate VMMDev request buffer (rc=%Rrc).  Will leak %u chunks.\n",
     932                        rc, pDevExt->MemBalloon.cChunks));
    934933            RTMemFree(pDevExt->MemBalloon.paMemObj);
    935934            pDevExt->MemBalloon.paMemObj = NULL;
     
    10481047        {
    10491048            pDevExt->pVMMDevMemory = pVMMDev;
    1050             LogFlowFunc(("VMMDevMemory: mapping=%p size=%#RX32 (%#RX32), version=%#RX32\n",
    1051                          pVMMDev, pVMMDev->u32Size, cbMMIO, pVMMDev->u32Version));
     1049            Log(("VBoxGuestInitDevExt: VMMDevMemory: mapping=%p size=%#RX32 (%#RX32) version=%#RX32\n",
     1050                 pVMMDev, pVMMDev->u32Size, cbMMIO, pVMMDev->u32Version));
    10521051        }
    10531052        else /* try live without it. */
    1054             LogRelFunc(("Bogus VMMDev memory; u32Version=%RX32 (expected %RX32), u32Size=%RX32 (expected <= %RX32)\n",
    1055                         pVMMDev->u32Version, VMMDEV_MEMORY_VERSION, pVMMDev->u32Size, cbMMIO));
     1053            LogRel(("VBoxGuestInitDevExt: Bogus VMMDev memory; u32Version=%RX32 (expected %RX32) u32Size=%RX32 (expected <= %RX32)\n",
     1054                    pVMMDev->u32Version, VMMDEV_MEMORY_VERSION, pVMMDev->u32Size, cbMMIO));
    10561055    }
    10571056
     
    10681067    if (RT_FAILURE(rc))
    10691068    {
    1070         LogRelFunc(("Failed to create spinlock, rc=%Rrc\n", rc));
     1069        LogRel(("VBoxGuestInitDevExt: failed to create spinlock, rc=%Rrc!\n", rc));
    10711070        if (pDevExt->EventSpinlock != NIL_RTSPINLOCK)
    10721071            RTSpinlockDestroy(pDevExt->EventSpinlock);
     
    10771076    if (RT_FAILURE(rc))
    10781077    {
    1079         LogRelFunc(("Failed to create mutex, rc=%Rrc\n", rc));
     1078        LogRel(("VBoxGuestInitDevExt: failed to create mutex, rc=%Rrc!\n", rc));
    10801079        RTSpinlockDestroy(pDevExt->SessionSpinlock);
    10811080        RTSpinlockDestroy(pDevExt->EventSpinlock);
     
    11121111                    rc = VBoxGuestReportDriverStatus(true /* Driver is active */);
    11131112                    if (RT_FAILURE(rc))
    1114                         LogRelFunc(("VBoxReportGuestDriverStatus failed, rc=%Rrc\n", rc));
     1113                        LogRel(("VBoxGuestInitDevExt: VBoxReportGuestDriverStatus failed, rc=%Rrc\n", rc));
    11151114
    11161115                    /** @todo Move heartbeat initialization into a separate function. */
     
    11291128                            rc = VbglGRAlloc(&pDevExt->pReqGuestHeartbeat, sizeof(*pDevExt->pReqGuestHeartbeat), VMMDevReq_GuestHeartbeat);
    11301129                            if (RT_FAILURE(rc))
    1131                                 LogRelFunc(("VbglGRAlloc(VMMDevReq_GuestHeartbeat) %Rrc\n", rc));
     1130                                LogRel(("VBoxGuestInitDevExt: VbglGRAlloc(VMMDevReq_GuestHeartbeat) %Rrc\n", rc));
    11321131
    11331132                            if (RT_SUCCESS(rc))
    11341133                            {
    1135                                 LogFlowFunc(("Setting up heartbeat to trigger every %RU64 sec\n", pDevExt->cNsHeartbeatInterval / 1000000000));
     1134                                LogRel(("VBoxGuestInitDevExt: Setting up heartbeat to trigger every %RU64 sec\n",
     1135                                        pDevExt->cNsHeartbeatInterval / 1000000000));
    11361136                                rc = RTTimerCreateEx(&pDevExt->pHeartbeatTimer, pDevExt->cNsHeartbeatInterval,
    11371137                                                     0, (PFNRTTIMER)VBoxGuestHeartbeatTimerHandler, pDevExt);
     
    11421142                                rc = RTTimerStart(pDevExt->pHeartbeatTimer, 0);
    11431143                                if (RT_FAILURE(rc))
    1144                                     LogRelFunc(("Heartbeat timer failed to start, rc=%Rrc\n", rc));
     1144                                    LogRel(("VBoxGuestInitDevExt: Heartbeat timer failed to start, rc=%Rrc\n", rc));
    11451145                            }
    11461146                            if (RT_FAILURE(rc))
    11471147                            {
    1148                                 LogRelFunc(("Failed to set up the timer, guest heartbeat is disabled\n"));
     1148                                LogRel(("VBoxGuestInitDevExt: Failed to set up the timer, guest heartbeat is disabled\n"));
    11491149                                /* Disable host heartbeat check if we failed */
    11501150                                VBoxGuestHeartbeatHostConfigure(pDevExt, false);
     
    11551155                        }
    11561156                        else
    1157                             LogRelFunc(("Failed to configure host for heartbeat checking, rc=%Rrc\n", rc));
     1157                            LogRel(("VBoxGuestInitDevExt: Failed to configure host for heartbeat checking, rc=%Rrc\n", rc));
    11581158                    }
    11591159
     
    11611161                    return VINF_SUCCESS;
    11621162                }
    1163                 else
    1164                     LogRelFunc(("Failed to set host flags, rc=%Rrc\n", rc));
     1163
     1164                LogRel(("VBoxGuestInitDevExt: failed to set host flags, rc=%Rrc\n", rc));
    11651165            }
    11661166            else
    1167                 LogRelFunc(("VBoxGuestInitDevExt: VBoxReportGuestInfo failed, rc=%Rrc\n", rc));
     1167                LogRel(("VBoxGuestInitDevExt: VBoxReportGuestInfo failed, rc=%Rrc\n", rc));
    11681168            VbglGRFree((VMMDevRequestHeader *)pDevExt->pIrqAckEvents);
    11691169        }
    11701170        else
    1171             LogRelFunc(("VBoxGRAlloc failed, rc=%Rrc\n", rc));
     1171            LogRel(("VBoxGuestInitDevExt: VBoxGRAlloc failed, rc=%Rrc\n", rc));
    11721172
    11731173        VbglTerminate();
    11741174    }
    11751175    else
    1176         LogRelFunc(("VbglInit failed, rc=%Rrc\n", rc));
     1176        LogRel(("VBoxGuestInitDevExt: VbglInit failed, rc=%Rrc\n", rc));
    11771177
    11781178    rc2 = RTSemFastMutexDestroy(pDevExt->MemBalloon.hMtx); AssertRC(rc2);
     
    13411341
    13421342    *ppSession = pSession;
    1343     LogFlowFunc(("pSession=%p proc=%RTproc (%d) r0proc=%p\n",
    1344                  pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */
     1343    LogFlow(("VBoxGuestCreateKernelSession: pSession=%p proc=%RTproc (%d) r0proc=%p\n",
     1344             pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */
    13451345    return VINF_SUCCESS;
    13461346}
     
    14191419    if (!pWait)
    14201420    {
    1421         static unsigned s_cErrors = 0;
    14221421        int rc;
    14231422
     
    14251424        if (!pWait)
    14261425        {
    1427             if (s_cErrors++ < 32)
    1428                 LogRelFunc(("Out of memory, returning NULL\n"));
     1426            LogRelMax(32, ("VBoxGuestWaitAlloc: out-of-memory!\n"));
    14291427            return NULL;
    14301428        }
     
    14331431        if (RT_FAILURE(rc))
    14341432        {
    1435             if (s_cErrors++ < 32)
    1436                 LogRelFunc(("RTSemEventMultiCreate failed with rc=%Rrc\n", rc));
     1433            LogRelMax(32, ("VBoxGuestCommonIOCtl: RTSemEventMultiCreate failed with rc=%Rrc!\n", rc));
    14371434            RTMemFree(pWait);
    14381435            return NULL;
     
    15641561    if (RT_FAILURE(rc))
    15651562    {
    1566         LogFlowFunc(("Failed to allocate %u (%#x) bytes to cache the request; rc=%Rrc\n",
    1567                      sizeof(*pReq), sizeof(*pReq), rc));
     1563        Log(("VBoxGuestSetGuestCapabilities: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",
     1564             sizeof(*pReq), sizeof(*pReq), rc));
    15681565        return rc;
    15691566    }
     
    15741571    rc = VbglGRPerform(&pReq->header);
    15751572    if (RT_FAILURE(rc))
    1576         LogFlowFunc(("VbglGRPerform failed, rc=%Rrc\n", rc));
     1573        Log(("VBoxGuestSetGuestCapabilities: VbglGRPerform failed, rc=%Rrc!\n", rc));
    15771574
    15781575    VbglGRFree(&pReq->header);
     
    15931590int  VBoxGuestCommonIOCtlFast(unsigned iFunction, PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession)
    15941591{
    1595     LogFlowFunc(("iFunction=%#x pDevExt=%p pSession=%p\n", iFunction, pDevExt, pSession));
     1592    LogFlow(("VBoxGuestCommonIOCtlFast: iFunction=%#x pDevExt=%p pSession=%p\n", iFunction, pDevExt, pSession));
    15961593
    15971594    NOREF(iFunction);
     
    16121609static int VBoxGuestCommonIOCtl_GetVMMDevPort(PVBOXGUESTDEVEXT pDevExt, VBoxGuestPortInfo *pInfo, size_t *pcbDataReturned)
    16131610{
    1614     LogFlowFuncEnter();
     1611    LogFlow(("VBoxGuestCommonIOCtl: GETVMMDEVPORT\n"));
    16151612
    16161613    pInfo->portAddress = pDevExt->IOPortBase;
     
    16321629int VBoxGuestCommonIOCtl_SetMouseNotifyCallback(PVBOXGUESTDEVEXT pDevExt, VBoxGuestMouseSetNotifyCallback *pNotify)
    16331630{
    1634     LogFlowFuncEnter();
     1631    LogFlow(("VBoxGuestCommonIOCtl: SET_MOUSE_NOTIFY_CALLBACK\n"));
    16351632
    16361633    RTSpinlockAcquire(pDevExt->EventSpinlock);
     
    16601657        pInfo->u32Result = VBOXGUEST_WAITEVENT_OK;
    16611658        if (fReqEvents & ~((uint32_t)1 << iEvent))
    1662             LogFlowFunc(("WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));
     1659            LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));
    16631660        else
    1664             LogFlowFunc(("WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
     1661            LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
    16651662        pSession->fPendingCancelWaitEvents = false;
    16661663        return VINF_SUCCESS;
     
    16921689    if (RT_UNLIKELY(iEvent < 0))
    16931690    {
    1694         LogRel(("Invalid input mask %#x\n", fReqEvents));
     1691        LogRel(("VBoxGuestCommonIOCtl: WAITEVENT: Invalid input mask %#x!!\n", fReqEvents));
    16951692        return VERR_INVALID_PARAMETER;
    16961693    }
     
    17071704    {
    17081705        pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT;
    1709         LogFlowFunc(("Returning VERR_TIMEOUT\n"));
     1706        LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns VERR_TIMEOUT\n"));
    17101707        return VERR_TIMEOUT;
    17111708    }
     
    17621759        pInfo->u32Result = VBOXGUEST_WAITEVENT_OK;
    17631760        if (fReqEvents & ~((uint32_t)1 << iEvent))
    1764             LogFlowFunc(("Returning %#x\n", pInfo->u32EventFlagsOut));
     1761            LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));
    17651762        else
    1766             LogFlowFunc(("Returning %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
     1763            LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
    17671764        rc = VINF_SUCCESS;
    17681765    }
     
    17721769        pInfo->u32Result = VBOXGUEST_WAITEVENT_INTERRUPTED;
    17731770        rc = VERR_INTERRUPTED;
    1774         LogFlowFunc(("Returning VERR_INTERRUPTED\n"));
     1771        LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns VERR_INTERRUPTED\n"));
    17751772    }
    17761773    else if (rc == VERR_TIMEOUT)
    17771774    {
    17781775        pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT;
    1779         LogFlowFunc(("Returning VERR_TIMEOUT (2)\n"));
     1776        LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns VERR_TIMEOUT (2)\n"));
    17801777    }
    17811778    else
     
    17831780        if (RT_SUCCESS(rc))
    17841781        {
    1785             static unsigned s_cErrors = 0;
    1786             if (s_cErrors++ < 32)
    1787                 LogRelFunc(("Returning %Rrc but no events\n", rc));
     1782            LogRelMax(32, ("VBoxGuestCommonIOCtl: WAITEVENT: returns %Rrc but no events!\n", rc));
    17881783            rc = VERR_INTERNAL_ERROR;
    17891784        }
    17901785        pInfo->u32Result = VBOXGUEST_WAITEVENT_ERROR;
    1791         LogFlowFunc(("Returning %Rrc\n", rc));
     1786        LogFlow(("VBoxGuestCommonIOCtl: WAITEVENT: returns %Rrc\n", rc));
    17921787    }
    17931788
     
    18071802    bool                    fCancelledOne = false;
    18081803
    1809     LogFlowFunc(("CANCEL_ALL_WAITEVENTS\n"));
     1804    LogFlow(("VBoxGuestCommonIOCtl: CANCEL_ALL_WAITEVENTS\n"));
    18101805
    18111806    /*
     
    19251920            {
    19261921                AssertFailed();
    1927                 LogRel(("calling caps set for acquired caps %d\n", pCaps->u32OrMask));
     1922                LogRel(("VBoxDrv: calling caps set for acquired caps %d\n", pCaps->u32OrMask));
    19281923                enmRequired = kLevel_NoOne;
    19291924                break;
     
    20272022    const uint32_t          cbMinSize = (uint32_t)vmmdevGetRequestSize(enmType);
    20282023
    2029     LogFlowFunc(("Type=%d\n", pReqHdr->requestType));
     2024    LogFlow(("VBoxGuestCommonIOCtl: VMMREQUEST type %d\n", pReqHdr->requestType));
    20302025
    20312026    if (cbReq < cbMinSize)
    20322027    {
    2033         LogRelFunc(("Invalid hdr size %#x, expected >= %#x; type=%#x!!\n",
    2034                     cbReq, cbMinSize, enmType));
     2028        LogRel(("VBoxGuestCommonIOCtl: VMMREQUEST: invalid hdr size %#x, expected >= %#x; type=%#x!!\n",
     2029                cbReq, cbMinSize, enmType));
    20352030        return VERR_INVALID_PARAMETER;
    20362031    }
    20372032    if (cbReq > cbData)
    20382033    {
    2039         LogRelFunc(("Invalid size %#x, expected >= %#x (hdr); type=%#x!!\n",
    2040                     cbData, cbReq, enmType));
     2034        LogRel(("VBoxGuestCommonIOCtl: VMMREQUEST: invalid size %#x, expected >= %#x (hdr); type=%#x!!\n",
     2035                cbData, cbReq, enmType));
    20412036        return VERR_INVALID_PARAMETER;
    20422037    }
     
    20442039    if (RT_FAILURE(rc))
    20452040    {
    2046         LogFlowFunc(("Invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc\n",
    2047                      cbData, cbReq, enmType, rc));
     2041        Log(("VBoxGuestCommonIOCtl: VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc!!\n",
     2042             cbData, cbReq, enmType, rc));
    20482043        return rc;
    20492044    }
     
    20522047    if (RT_FAILURE(rc))
    20532048    {
    2054         LogFlowFunc(("Operation not allowed! type=%#x, rc=%Rrc\n", enmType, rc));
     2049        Log(("VBoxGuestCommonIOCtl: VMMREQUEST: Operation not allowed! type=%#x rc=%Rrc\n", enmType, rc));
    20552050        return rc;
    20562051    }
     
    20662061    if (RT_FAILURE(rc))
    20672062    {
    2068         LogFlowFunc(("Failed to allocate %u (%#x) bytes to cache the request; rc=%Rrc\n",
    2069                      cbReq, cbReq, rc));
     2063        Log(("VBoxGuestCommonIOCtl: VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",
     2064             cbReq, cbReq, rc));
    20702065        return rc;
    20712066    }
     
    20872082    }
    20882083    else if (RT_FAILURE(rc))
    2089         LogFlowFunc(("VbglGRPerform failed; rc=%Rrc\n", rc));
     2084        Log(("VBoxGuestCommonIOCtl: VMMREQUEST: VbglGRPerform - rc=%Rrc!\n", rc));
    20902085    else
    20912086    {
    2092         LogFlowFunc(("Request execution failed; VMMDev rc=%Rrc\n",
    2093                      pReqCopy->rc));
     2087        Log(("VBoxGuestCommonIOCtl: VMMREQUEST: request execution failed; VMMDev rc=%Rrc!\n", pReqCopy->rc));
    20942088        rc = pReqCopy->rc;
    20952089    }
     
    22302224        &&  (    !fInterruptible
    22312225             ||  rc != VERR_INTERRUPTED))
    2232         LogRelFlow(("wait failed! %Rrc\n", rc));
     2226        LogRel(("VBoxGuestHGCMAsyncWaitCallback: wait failed! %Rrc\n", rc));
    22332227
    22342228    VBoxGuestWaitFreeUnlocked(pDevExt, pWait);
     
    22452239{
    22462240    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvUser;
    2247     LogFlowFunc(("requestType=%d\n", pHdr->header.requestType));
     2241    LogFlow(("VBoxGuestHGCMAsyncWaitCallback: requestType=%d\n", pHdr->header.requestType));
    22482242    return VBoxGuestHGCMAsyncWaitCallbackWorker((VMMDevHGCMRequestHeader volatile *)pHdr,
    22492243                                                pDevExt,
     
    22622256{
    22632257    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvUser;
    2264     LogFlowFunc(("requestType=%d\n", pHdr->header.requestType));
     2258    LogFlow(("VBoxGuestHGCMAsyncWaitCallbackInterruptible: requestType=%d\n", pHdr->header.requestType));
    22652259    return VBoxGuestHGCMAsyncWaitCallbackWorker((VMMDevHGCMRequestHeader volatile *)pHdr,
    22662260                                                pDevExt,
     
    22812275     * to deal with cancelled requests.
    22822276     */
    2283     LogFlowFunc(("%.128s\n",
    2284                    pInfo->Loc.type == VMMDevHGCMLoc_LocalHost || pInfo->Loc.type == VMMDevHGCMLoc_LocalHost_Existing
    2285                  ? pInfo->Loc.u.host.achName : "<not local host>"));
     2277    Log(("VBoxGuestCommonIOCtl: HGCM_CONNECT: %.128s\n",
     2278         pInfo->Loc.type == VMMDevHGCMLoc_LocalHost || pInfo->Loc.type == VMMDevHGCMLoc_LocalHost_Existing
     2279         ? pInfo->Loc.u.host.achName : "<not local host>"));
    22862280
    22872281    rc = VbglR0HGCMInternalConnect(pInfo, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
    22882282    if (RT_SUCCESS(rc))
    22892283    {
    2290         LogFlowFunc(("u32Client=%RX32 result=%Rrc (rc=%Rrc)\n",
    2291                      pInfo->u32ClientID, pInfo->result, rc));
     2284        Log(("VBoxGuestCommonIOCtl: HGCM_CONNECT: u32Client=%RX32 result=%Rrc (rc=%Rrc)\n",
     2285             pInfo->u32ClientID, pInfo->result, rc));
    22922286        if (RT_SUCCESS(pInfo->result))
    22932287        {
     
    23072301            if (i >= RT_ELEMENTS(pSession->aHGCMClientIds))
    23082302            {
    2309                 static unsigned             s_cErrors = 0;
    23102303                VBoxGuestHGCMDisconnectInfo Info;
    2311 
    2312                 if (s_cErrors++ < 32)
    2313                     LogRelFunc(("Too many HGCMConnect calls for one session\n"));
    2314 
     2304                LogRelMax(32, ("VBoxGuestCommonIOCtl: HGCM_CONNECT: too many HGCMConnect calls for one session!\n"));
    23152305                Info.result = 0;
    23162306                Info.u32ClientID = pInfo->u32ClientID;
     
    23472337    if (i >= RT_ELEMENTS(pSession->aHGCMClientIds))
    23482338    {
    2349         static unsigned s_cErrors = 0;
    2350         if (s_cErrors++ > 32)
    2351             LogRelFunc(("u32Client=%RX32\n", u32ClientId));
     2339        LogRelMax(32, ("VBoxGuestCommonIOCtl: HGCM_DISCONNECT: u32Client=%RX32\n", u32ClientId));
    23522340        return VERR_INVALID_HANDLE;
    23532341    }
     
    23582346     * to deal with cancelled requests.
    23592347     */
    2360     LogFlowFunc(("u32Client=%RX32\n", pInfo->u32ClientID));
     2348    Log(("VBoxGuestCommonIOCtl: HGCM_DISCONNECT: u32Client=%RX32\n", pInfo->u32ClientID));
    23612349    rc = VbglR0HGCMInternalDisconnect(pInfo, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
    23622350    if (RT_SUCCESS(rc))
    23632351    {
    2364         LogFlowFunc(("Disconnected with rc=%Rrc\n", pInfo->result)); /** int32_t vs. int! */
     2352        LogFlow(("VBoxGuestCommonIOCtl: HGCM_DISCONNECT: result=%Rrc\n", pInfo->result));
    23652353        if (pcbDataReturned)
    23662354            *pcbDataReturned = sizeof(*pInfo);
     
    23942382    if (pInfo->cParms > 4096) /* (Just make sure it doesn't overflow the next check.) */
    23952383    {
    2396         LogRelFunc(("cParm=%RX32 is not sane\n", pInfo->cParms));
     2384        LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms));
    23972385        return VERR_INVALID_PARAMETER;
    23982386    }
     
    24072395    if (cbData < cbActual)
    24082396    {
    2409         LogRelFunc(("cbData=%#zx (%zu) required size is %#zx (%zu)\n",
    2410                     cbData, cbData, cbActual, cbActual));
     2397        LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n",
     2398               cbData, cbData, cbActual, cbActual));
    24112399        return VERR_INVALID_PARAMETER;
    24122400    }
     
    24222410    if (RT_UNLIKELY(i >= RT_ELEMENTS(pSession->aHGCMClientIds)))
    24232411    {
    2424         static unsigned s_cErrors = 0;
    2425         if (s_cErrors++ > 32)
    2426             LogRelFunc(("Invalid handle; u32Client=%RX32\n", u32ClientId));
     2412        LogRelMax(32, ("VBoxGuestCommonIOCtl: HGCM_CALL: Invalid handle. u32Client=%RX32\n", u32ClientId));
    24272413        return VERR_INVALID_HANDLE;
    24282414    }
     
    24342420     * be interruptible (should add a flag for this later I guess).
    24352421     */
    2436     LogFlowFunc(("u32Client=%RX32\n", pInfo->u32ClientID));
     2422    LogFlow(("VBoxGuestCommonIOCtl: HGCM_CALL: u32Client=%RX32\n", pInfo->u32ClientID));
    24372423    fFlags = !fUserData && pSession->R0Process == NIL_RTR0PROCESS ? VBGLR0_HGCMCALL_F_KERNEL : VBGLR0_HGCMCALL_F_USER;
    24382424    uint32_t cbInfo = (uint32_t)(cbData - cbExtra);
     
    24552441    if (RT_SUCCESS(rc))
    24562442    {
    2457         LogFlowFunc(("Result rc=%Rrc\n", pInfo->result)); /** int32_t vs. int! */
     2443        LogFlow(("VBoxGuestCommonIOCtl: HGCM_CALL: result=%Rrc\n", pInfo->result));
    24582444        if (pcbDataReturned)
    24592445            *pcbDataReturned = cbActual;
     
    24632449        if (   rc != VERR_INTERRUPTED
    24642450            && rc != VERR_TIMEOUT)
    2465         {
    2466             static unsigned s_cErrors = 0;
    2467             if (s_cErrors++ < 32)
    2468                 LogRelFunc(("%s-bit call failed; rc=%Rrc\n",
    2469                             f32bit ? "32" : "64", rc));
    2470         }
     2451            LogRelMax(32, ("VBoxGuestCommonIOCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
    24712452        else
    2472             LogFlowFunc(("%s-bit call failed; rc=%Rrc\n",
    2473                          f32bit ? "32" : "64", rc));
     2453            Log(("VBoxGuestCommonIOCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
    24742454    }
    24752455    return rc;
    24762456}
     2457
    24772458#endif /* VBOX_WITH_HGCM */
    2478 
    24792459
    24802460/**
     
    24962476                                                   VBoxGuestCheckBalloonInfo *pInfo, size_t *pcbDataReturned)
    24972477{
    2498     LogFlowFuncEnter();
    2499 
    2500     int rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx);
     2478    VMMDevGetMemBalloonChangeRequest *pReq;
     2479    int rc;
     2480
     2481    LogFlow(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON\n"));
     2482    rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx);
    25012483    AssertRCReturn(rc, rc);
    25022484
     
    25072489    if (   pDevExt->MemBalloon.pOwner != pSession
    25082490        && pDevExt->MemBalloon.pOwner == NULL)
    2509     {
    25102491        pDevExt->MemBalloon.pOwner = pSession;
    2511     }
    25122492
    25132493    if (pDevExt->MemBalloon.pOwner == pSession)
    25142494    {
    2515         VMMDevGetMemBalloonChangeRequest *pReq;
    2516         rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest),
    2517                          VMMDevReq_GetMemBalloonChangeRequest);
     2495        rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest), VMMDevReq_GetMemBalloonChangeRequest);
    25182496        if (RT_SUCCESS(rc))
    25192497        {
     
    25442522            }
    25452523            else
    2546                 LogRelFunc(("VbglGRPerform failed; rc=%Rrc\n", rc));
     2524                LogRel(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON: VbglGRPerform failed. rc=%Rrc\n", rc));
    25472525            VbglGRFree(&pReq->header);
    25482526        }
     
    25522530
    25532531    RTSemFastMutexRelease(pDevExt->MemBalloon.hMtx);
    2554 
    2555     LogFlowFunc(("Returns %Rrc\n", rc));
     2532    LogFlow(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON returns %Rrc\n", rc));
    25562533    return rc;
    25572534}
     
    25722549                                                    VBoxGuestChangeBalloonInfo *pInfo, size_t *pcbDataReturned)
    25732550{
    2574     int rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx);
     2551    int rc;
     2552
     2553    LogFlow(("VBoxGuestCommonIOCtl: CHANGE_BALLOON\n"));
     2554    rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx);
    25752555    AssertRCReturn(rc, rc);
    25762556
     
    25872567        if (pDevExt->MemBalloon.pOwner == pSession)
    25882568        {
    2589             rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, pInfo->u64ChunkAddr,
    2590                                                  !!pInfo->fInflate);
     2569            rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, pInfo->u64ChunkAddr, !!pInfo->fInflate);
    25912570            if (pcbDataReturned)
    25922571                *pcbDataReturned = 0;
     
    26142593{
    26152594    VMMDevReqWriteCoreDump *pReq = NULL;
    2616     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevReqWriteCoreDump),
    2617                          VMMDevReq_WriteCoreDump);
     2595    int rc;
     2596
     2597    LogFlow(("VBoxGuestCommonIOCtl: WRITE_CORE_DUMP\n"));
     2598    rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump);
    26182599    if (RT_FAILURE(rc))
    26192600    {
    2620         LogFlowFunc(("Failed to allocate %u (%#x) bytes to cache the request; rc=%Rrc\n",
    2621                      sizeof(VMMDevReqWriteCoreDump), sizeof(VMMDevReqWriteCoreDump), rc));
     2601        Log(("VBoxGuestCommonIOCtl: WRITE_CORE_DUMP: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",
     2602             sizeof(*pReq), sizeof(*pReq), rc));
    26222603        return rc;
    26232604    }
     
    26262607    rc = VbglGRPerform(&pReq->header);
    26272608    if (RT_FAILURE(rc))
    2628         LogFlowFunc(("VbglGRPerform failed, rc=%Rrc\n", rc));
     2609        Log(("VBoxGuestCommonIOCtl: WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc));
    26292610
    26302611    VbglGRFree(&pReq->header);
     
    26582639}
    26592640
     2641
    26602642static bool VBoxGuestCommonGuestCapsValidateValues(uint32_t fCaps)
    26612643{
     
    26652647    return true;
    26662648}
     2649
    26672650
    26682651/** Check whether any unreported VMM device events should be reported to any of
     
    27252708    if (!VBoxGuestCommonGuestCapsValidateValues(fOrMask))
    27262709    {
    2727         LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid fOrMask\n",
    2728                     pSession, fOrMask, fNotMask, enmFlags));
     2710        LogRel(("VBoxGuestCommonGuestCapsAcquire: pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid fOrMask\n",
     2711                pSession, fOrMask, fNotMask, enmFlags));
    27292712        return VERR_INVALID_PARAMETER;
    27302713    }
     
    27332716        && enmFlags != VBOXGUESTCAPSACQUIRE_FLAGS_NONE)
    27342717    {
    2735         LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid enmFlags %d\n",
    2736                     pSession, fOrMask, fNotMask, enmFlags));
     2718        LogRel(("VBoxGuestCommonGuestCapsAcquire: pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid enmFlags %d\n",
     2719                pSession, fOrMask, fNotMask, enmFlags));
    27372720        return VERR_INVALID_PARAMETER;
    27382721    }
     
    27402723    if (!VBoxGuestCommonGuestCapsModeSet(pDevExt, fOrMask, true, &fSetCaps))
    27412724    {
    2742         LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- calling caps acquire for set caps\n",
    2743                     pSession, fOrMask, fNotMask, enmFlags));
     2725        LogRel(("VBoxGuestCommonGuestCapsAcquire: pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- calling caps acquire for set caps\n",
     2726                pSession, fOrMask, fNotMask, enmFlags));
    27442727        return VERR_INVALID_STATE;
    27452728    }
     
    27472730    if (enmFlags & VBOXGUESTCAPSACQUIRE_FLAGS_CONFIG_ACQUIRE_MODE)
    27482731    {
    2749         LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- configured acquire caps: 0x%x\n",
    2750                     pSession, fOrMask, fNotMask, enmFlags));
     2732        Log(("VBoxGuestCommonGuestCapsAcquire: pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- configured acquire caps: 0x%x\n",
     2733             pSession, fOrMask, fNotMask, enmFlags));
    27512734        return VINF_SUCCESS;
    27522735    }
     
    27882771    if (fOtherConflictingCaps)
    27892772    {
    2790         LogFlowFunc(("Caps 0x%x were busy\n", fOtherConflictingCaps));
     2773        Log(("VBoxGuestCommonGuestCapsAcquire: Caps 0x%x were busy\n", fOtherConflictingCaps));
    27912774        return VERR_RESOURCE_BUSY;
    27922775    }
     
    28022785    if (RT_FAILURE(rc))
    28032786    {
    2804         LogRelFunc(("VBoxGuestSetGuestCapabilities failed, rc=%Rrc\n", rc));
     2787        LogRel(("VBoxGuestCommonGuestCapsAcquire: VBoxGuestSetGuestCapabilities failed, rc=%Rrc\n", rc));
    28052788
    28062789        /* Failure branch
     
    28292812}
    28302813
     2814
    28312815static int VBoxGuestCommonIOCTL_GuestCapsAcquire(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, VBoxGuestCapsAquire *pAcquire)
    28322816{
    28332817    int rc = VBoxGuestCommonGuestCapsAcquire(pDevExt, pSession, pAcquire->u32OrMask, pAcquire->u32NotMask, pAcquire->enmFlags);
    28342818    if (RT_FAILURE(rc))
    2835         LogRelFunc(("Failed, rc=%Rrc\n", rc));
     2819        LogRel(("VBoxGuestCommonIOCtl: GUEST_CAPS_ACQUIRE failed rc=%Rrc\n", rc));
    28362820    pAcquire->rc = rc;
    28372821    return VINF_SUCCESS;
     
    28582842{
    28592843    int rc;
    2860     LogFlowFunc(("iFunction=%#x, pDevExt=%p, pSession=%p, pvData=%p, cbData=%zu\n",
    2861                  iFunction, pDevExt, pSession, pvData, cbData));
     2844    LogFlow(("VBoxGuestCommonIOCtl: iFunction=%#x pDevExt=%p pSession=%p pvData=%p cbData=%zu\n",
     2845             iFunction, pDevExt, pSession, pvData, cbData));
    28622846
    28632847    /*
     
    30703054            default:
    30713055            {
    3072                 LogRelFunc(("Unknown request iFunction=%#x, stripped size=%#x\n",
    3073                             iFunction, VBOXGUEST_IOCTL_STRIP_SIZE(iFunction)));
     3056                LogRel(("VBoxGuestCommonIOCtl: Unknown request iFunction=%#x stripped size=%#x\n",
     3057                        iFunction, VBOXGUEST_IOCTL_STRIP_SIZE(iFunction)));
    30743058                rc = VERR_NOT_SUPPORTED;
    30753059                break;
     
    30783062    }
    30793063
    3080     LogFlowFunc(("Returning %Rrc *pcbDataReturned=%zu\n", rc, pcbDataReturned ? *pcbDataReturned : 0));
     3064    LogFlow(("VBoxGuestCommonIOCtl: returns %Rrc *pcbDataReturned=%zu\n", rc, pcbDataReturned ? *pcbDataReturned : 0));
    30813065    return rc;
    30823066}
     
    31273111            PVBOXGUESTWAIT  pSafe;
    31283112
    3129 #ifndef DEBUG_andy
    3130             LogFlowFunc(("Acknowledge events succeeded: %#RX32\n", fEvents));
    3131 #endif
     3113            Log3(("VBoxGuestCommonISR: acknowledge events succeeded %#RX32\n", fEvents));
     3114
    31323115            /*
    31333116             * VMMDEV_EVENT_MOUSE_POSITION_CHANGED can only be polled for.
     
    31393122#ifndef RT_OS_WINDOWS
    31403123                if (pDevExt->MouseNotifyCallback.pfnNotify)
    3141                     pDevExt->MouseNotifyCallback.pfnNotify
    3142                                           (pDevExt->MouseNotifyCallback.pvUser);
     3124                    pDevExt->MouseNotifyCallback.pfnNotify(pDevExt->MouseNotifyCallback.pvUser);
    31433125#endif
    31443126            }
     
    31943176        }
    31953177        else /* something is serious wrong... */
    3196             LogFlowFunc(("Acknowledging events failed, rc=%Rrc (events=%#x)\n",
    3197                          pReq->header.rc, pReq->events));
    3198     }
    3199 #ifndef DEBUG_andy
     3178            Log(("VBoxGuestCommonISR: acknowledge events failed rc=%Rrc (events=%#x)!!\n",
     3179                 pReq->header.rc, pReq->events));
     3180    }
    32003181    else
    3201         LogFlowFunc(("Not ours\n"));
    3202 #endif
     3182        Log3(("VBoxGuestCommonISR: not ours\n"));
    32033183
    32043184    RTSpinlockRelease(pDevExt->EventSpinlock);
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