- Timestamp:
- Mar 17, 2014 2:46:34 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92834
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r50770 r50803 5 5 6 6 /* 7 * Copyright (C) 2007-201 3Oracle Corporation7 * Copyright (C) 2007-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 360 360 */ 361 361 if (pReq->hypervisorSize == 0) 362 Log (("vboxGuestInitFixateGuestMappings: nothing to do\n"));362 LogFlowFunc(("Nothing to do\n")); 363 363 else 364 364 { … … 372 372 uint32_t iTry; 373 373 bool fBitched = false; 374 Log (("vboxGuestInitFixateGuestMappings:cbHypervisor=%#x\n", cbHypervisor));374 LogFlowFunc(("cbHypervisor=%#x\n", cbHypervisor)); 375 375 for (iTry = 0; iTry < RT_ELEMENTS(ahTries); iTry++) 376 376 { … … 699 699 rc = VBoxGuestReportDriverStatus(true /* Driver is active */); 700 700 if (RT_FAILURE(rc)) 701 Log (("VBoxGuest::VBoxGuestReinitDevExtAfterHibernation: could not report guest driver status, rc=%Rrc\n", rc));701 LogFlowFunc(("Could not report guest driver status, rc=%Rrc\n", rc)); 702 702 } 703 703 else 704 Log(("VBoxGuest::VBoxGuestReinitDevExtAfterHibernation: could not report guest information to host, rc=%Rrc\n", rc)); 705 Log(("VBoxGuest::VBoxGuestReinitDevExtAfterHibernation: returned with rc=%Rrc\n", rc)); 704 LogFlowFunc(("Could not report guest information to host, rc=%Rrc\n", rc)); 705 706 LogFlowFunc(("Returned with rc=%Rrc\n", rc)); 706 707 return rc; 707 708 } … … 806 807 else 807 808 { 808 Log (("vboxGuestSetBalloonSize(inflate): failed, rc=%Rrc!\n", rc));809 LogFlowFunc(("Inflating failed, rc=%Rrc\n", rc)); 809 810 RTR0MemObjFree(*pMemObj, true); 810 811 *pMemObj = NIL_RTR0MEMOBJ; … … 818 819 pDevExt->MemBalloon.cChunks--; 819 820 else 820 Log (("vboxGuestSetBalloonSize(deflate): failed, rc=%Rrc!\n", rc));821 LogFlowFunc(("Deflating failed, rc=%Rrc\n", rc)); 821 822 } 822 823 … … 853 854 if (RT_FAILURE(rc)) 854 855 { 855 LogRel (("vboxGuestCloseMemBalloon: Deflate failed with rc=%Rrc. Will leak %u chunks.\n",856 rc, pDevExt->MemBalloon.cChunks));856 LogRelFunc(("Deflating balloon failed with rc=%Rrc; will leak %u chunks\n", 857 rc, pDevExt->MemBalloon.cChunks)); 857 858 break; 858 859 } … … 863 864 } 864 865 else 865 LogRel (("vboxGuestCloseMemBalloon: Failed to allocate VMMDev request buffer (rc=%Rrc). Will leak %u chunks.\n",866 rc, pDevExt->MemBalloon.cChunks));866 LogRelFunc(("Failed to allocate VMMDev request buffer, rc=%Rrc; will leak %u chunks\n", 867 rc, pDevExt->MemBalloon.cChunks)); 867 868 RTMemFree(pDevExt->MemBalloon.paMemObj); 868 869 pDevExt->MemBalloon.paMemObj = NULL; … … 971 972 { 972 973 pDevExt->pVMMDevMemory = pVMMDev; 973 Log (("VBoxGuestInitDevExt: VMMDevMemory: mapping=%p size=%#RX32 (%#RX32)version=%#RX32\n",974 pVMMDev, pVMMDev->u32Size, cbMMIO, pVMMDev->u32Version));974 LogFlowFunc(("VMMDevMemory: mapping=%p size=%#RX32 (%#RX32), version=%#RX32\n", 975 pVMMDev, pVMMDev->u32Size, cbMMIO, pVMMDev->u32Version)); 975 976 } 976 977 else /* try live without it. */ 977 LogRel (("VBoxGuestInitDevExt: Bogus VMMDev memory; u32Version=%RX32 (expected %RX32)u32Size=%RX32 (expected <= %RX32)\n",978 pVMMDev->u32Version, VMMDEV_MEMORY_VERSION, pVMMDev->u32Size, cbMMIO));978 LogRelFunc(("Bogus VMMDev memory; u32Version=%RX32 (expected %RX32), u32Size=%RX32 (expected <= %RX32)\n", 979 pVMMDev->u32Version, VMMDEV_MEMORY_VERSION, pVMMDev->u32Size, cbMMIO)); 979 980 } 980 981 … … 991 992 if (RT_FAILURE(rc)) 992 993 { 993 LogRel (("VBoxGuestInitDevExt: failed to create spinlock, rc=%Rrc!\n", rc));994 LogRelFunc(("Failed to create spinlock, rc=%Rrc\n", rc)); 994 995 if (pDevExt->EventSpinlock != NIL_RTSPINLOCK) 995 996 RTSpinlockDestroy(pDevExt->EventSpinlock); … … 1000 1001 if (RT_FAILURE(rc)) 1001 1002 { 1002 LogRel (("VBoxGuestInitDevExt: failed to create mutex, rc=%Rrc!\n", rc));1003 LogRelFunc(("Failed to create mutex, rc=%Rrc\n", rc)); 1003 1004 RTSpinlockDestroy(pDevExt->SessionSpinlock); 1004 1005 RTSpinlockDestroy(pDevExt->EventSpinlock); … … 1035 1036 rc = VBoxGuestReportDriverStatus(true /* Driver is active */); 1036 1037 if (RT_FAILURE(rc)) 1037 LogRel (("VBoxGuestInitDevExt:VBoxReportGuestDriverStatus failed, rc=%Rrc\n", rc));1038 1039 Log (("VBoxGuestInitDevExt: returns success\n"));1038 LogRelFunc(("VBoxReportGuestDriverStatus failed, rc=%Rrc\n", rc)); 1039 1040 LogFlowFunc(("VBoxGuestInitDevExt: returns success\n")); 1040 1041 return VINF_SUCCESS; 1041 1042 } 1042 1043 else 1043 LogRelFunc((" failed to set host flags, rc=%Rrc\n", rc));1044 LogRelFunc(("Failed to set host flags, rc=%Rrc\n", rc)); 1044 1045 } 1045 1046 else 1046 LogRel (("VBoxGuestInitDevExt: VBoxReportGuestInfo failed, rc=%Rrc\n", rc));1047 LogRelFunc(("VBoxGuestInitDevExt: VBoxReportGuestInfo failed, rc=%Rrc\n", rc)); 1047 1048 VbglGRFree((VMMDevRequestHeader *)pDevExt->pIrqAckEvents); 1048 1049 } 1049 1050 else 1050 LogRel (("VBoxGuestInitDevExt:VBoxGRAlloc failed, rc=%Rrc\n", rc));1051 LogRelFunc(("VBoxGRAlloc failed, rc=%Rrc\n", rc)); 1051 1052 1052 1053 VbglTerminate(); 1053 1054 } 1054 1055 else 1055 LogRel (("VBoxGuestInitDevExt:VbglInit failed, rc=%Rrc\n", rc));1056 LogRelFunc(("VbglInit failed, rc=%Rrc\n", rc)); 1056 1057 1057 1058 rc2 = RTSemFastMutexDestroy(pDevExt->MemBalloon.hMtx); AssertRC(rc2); … … 1207 1208 1208 1209 *ppSession = pSession; 1209 LogFlow (("VBoxGuestCreateKernelSession:pSession=%p proc=%RTproc (%d) r0proc=%p\n",1210 pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */1210 LogFlowFunc(("pSession=%p proc=%RTproc (%d) r0proc=%p\n", 1211 pSession, pSession->Process, (int)pSession->Process, (uintptr_t)pSession->R0Process)); /** @todo %RTr0proc */ 1211 1212 return VINF_SUCCESS; 1212 1213 } … … 1292 1293 { 1293 1294 if (s_cErrors++ < 32) 1294 LogRel (("VBoxGuestWaitAlloc: out-of-memory!\n"));1295 LogRelFunc(("Out of memory, returning NULL\n")); 1295 1296 return NULL; 1296 1297 } … … 1300 1301 { 1301 1302 if (s_cErrors++ < 32) 1302 LogRel (("VBoxGuestCommonIOCtl: RTSemEventMultiCreate failed with rc=%Rrc!\n", rc));1303 LogRelFunc(("RTSemEventMultiCreate failed with rc=%Rrc\n", rc)); 1303 1304 RTMemFree(pWait); 1304 1305 return NULL; … … 1430 1431 if (RT_FAILURE(rc)) 1431 1432 { 1432 Log (("VBoxGuestSetGuestCapabilities: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",1433 sizeof(*pReq), sizeof(*pReq), rc));1433 LogFlowFunc(("Failed to allocate %u (%#x) bytes to cache the request; rc=%Rrc\n", 1434 sizeof(*pReq), sizeof(*pReq), rc)); 1434 1435 return rc; 1435 1436 } … … 1440 1441 rc = VbglGRPerform(&pReq->header); 1441 1442 if (RT_FAILURE(rc)) 1442 Log (("VBoxGuestSetGuestCapabilities: VbglGRPerform failed, rc=%Rrc!\n", rc));1443 LogFlowFunc(("VbglGRPerform failed, rc=%Rrc\n", rc)); 1443 1444 1444 1445 VbglGRFree(&pReq->header); … … 1459 1460 int VBoxGuestCommonIOCtlFast(unsigned iFunction, PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession) 1460 1461 { 1461 Log (("VBoxGuestCommonIOCtlFast:iFunction=%#x pDevExt=%p pSession=%p\n", iFunction, pDevExt, pSession));1462 LogFlowFunc(("iFunction=%#x pDevExt=%p pSession=%p\n", iFunction, pDevExt, pSession)); 1462 1463 1463 1464 NOREF(iFunction); … … 1478 1479 static int VBoxGuestCommonIOCtl_GetVMMDevPort(PVBOXGUESTDEVEXT pDevExt, VBoxGuestPortInfo *pInfo, size_t *pcbDataReturned) 1479 1480 { 1480 Log(("VBoxGuestCommonIOCtl: GETVMMDEVPORT\n")); 1481 LogFlowFuncEnter(); 1482 1481 1483 pInfo->portAddress = pDevExt->IOPortBase; 1482 1484 pInfo->pVMMDevMemory = (VMMDevMemory *)pDevExt->pVMMDevMemory; … … 1497 1499 int VBoxGuestCommonIOCtl_SetMouseNotifyCallback(PVBOXGUESTDEVEXT pDevExt, VBoxGuestMouseSetNotifyCallback *pNotify) 1498 1500 { 1499 Log (("VBoxGuestCommonIOCtl: SET_MOUSE_NOTIFY_CALLBACK\n"));1501 LogFlowFuncEnter(); 1500 1502 1501 1503 RTSpinlockAcquire(pDevExt->EventSpinlock); … … 1525 1527 pInfo->u32Result = VBOXGUEST_WAITEVENT_OK; 1526 1528 if (fReqEvents & ~((uint32_t)1 << iEvent)) 1527 Log (("VBoxGuestCommonIOCtl:WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));1529 LogFlowFunc(("WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut)); 1528 1530 else 1529 Log (("VBoxGuestCommonIOCtl:WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));1531 LogFlowFunc(("WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent)); 1530 1532 pSession->fPendingCancelWaitEvents = false; 1531 1533 return VINF_SUCCESS; 1532 1534 } 1535 1533 1536 RTSpinlockReleaseNoInts(pDevExt->EventSpinlock); 1534 1537 return VERR_TIMEOUT; … … 1556 1559 if (RT_UNLIKELY(iEvent < 0)) 1557 1560 { 1558 LogRel((" VBoxGuestCommonIOCtl: WAITEVENT: Invalid input mask %#x!!\n", fReqEvents));1561 LogRel(("Invalid input mask %#x\n", fReqEvents)); 1559 1562 return VERR_INVALID_PARAMETER; 1560 1563 } … … 1571 1574 { 1572 1575 pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT; 1573 Log (("VBoxGuestCommonIOCtl: WAITEVENT: returnsVERR_TIMEOUT\n"));1576 LogFlowFunc(("Returning VERR_TIMEOUT\n")); 1574 1577 return VERR_TIMEOUT; 1575 1578 } … … 1626 1629 pInfo->u32Result = VBOXGUEST_WAITEVENT_OK; 1627 1630 if (fReqEvents & ~((uint32_t)1 << iEvent)) 1628 Log (("VBoxGuestCommonIOCtl: WAITEVENT: returns%#x\n", pInfo->u32EventFlagsOut));1631 LogFlowFunc(("Returning %#x\n", pInfo->u32EventFlagsOut)); 1629 1632 else 1630 Log (("VBoxGuestCommonIOCtl: WAITEVENT: returns%#x/%d\n", pInfo->u32EventFlagsOut, iEvent));1633 LogFlowFunc(("Returning %#x/%d\n", pInfo->u32EventFlagsOut, iEvent)); 1631 1634 rc = VINF_SUCCESS; 1632 1635 } … … 1636 1639 pInfo->u32Result = VBOXGUEST_WAITEVENT_INTERRUPTED; 1637 1640 rc = VERR_INTERRUPTED; 1638 Log (("VBoxGuestCommonIOCtl: WAITEVENT: returnsVERR_INTERRUPTED\n"));1641 LogFlowFunc(("Returning VERR_INTERRUPTED\n")); 1639 1642 } 1640 1643 else if (rc == VERR_TIMEOUT) 1641 1644 { 1642 1645 pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT; 1643 Log (("VBoxGuestCommonIOCtl: WAITEVENT: returnsVERR_TIMEOUT (2)\n"));1646 LogFlowFunc(("Returning VERR_TIMEOUT (2)\n")); 1644 1647 } 1645 1648 else … … 1649 1652 static unsigned s_cErrors = 0; 1650 1653 if (s_cErrors++ < 32) 1651 LogRel (("VBoxGuestCommonIOCtl: WAITEVENT: returns %Rrc but no events!\n", rc));1654 LogRelFunc(("Returning %Rrc but no events\n", rc)); 1652 1655 rc = VERR_INTERNAL_ERROR; 1653 1656 } 1654 1657 pInfo->u32Result = VBOXGUEST_WAITEVENT_ERROR; 1655 Log (("VBoxGuestCommonIOCtl: WAITEVENT: returns%Rrc\n", rc));1658 LogFlowFunc(("Returning %Rrc\n", rc)); 1656 1659 } 1657 1660 … … 1671 1674 bool fCancelledOne = false; 1672 1675 1673 Log (("VBoxGuestCommonIOCtl:CANCEL_ALL_WAITEVENTS\n"));1676 LogFlowFunc(("CANCEL_ALL_WAITEVENTS\n")); 1674 1677 1675 1678 /* … … 1891 1894 const uint32_t cbMinSize = vmmdevGetRequestSize(enmType); 1892 1895 1893 Log (("VBoxGuestCommonIOCtl: VMMREQUEST type%d\n", pReqHdr->requestType));1896 LogFlowFunc(("Type=%d\n", pReqHdr->requestType)); 1894 1897 1895 1898 if (cbReq < cbMinSize) 1896 1899 { 1897 LogRel (("VBoxGuestCommonIOCtl: VMMREQUEST: invalid hdr size %#x, expected >= %#x; type=%#x!!\n",1898 cbReq, cbMinSize, enmType));1900 LogRelFunc(("Invalid hdr size %#x, expected >= %#x; type=%#x!!\n", 1901 cbReq, cbMinSize, enmType)); 1899 1902 return VERR_INVALID_PARAMETER; 1900 1903 } 1901 1904 if (cbReq > cbData) 1902 1905 { 1903 LogRel (("VBoxGuestCommonIOCtl: VMMREQUEST: invalid size %#x, expected >= %#x (hdr); type=%#x!!\n",1904 cbData, cbReq, enmType));1906 LogRelFunc(("Invalid size %#x, expected >= %#x (hdr); type=%#x!!\n", 1907 cbData, cbReq, enmType)); 1905 1908 return VERR_INVALID_PARAMETER; 1906 1909 } … … 1908 1911 if (RT_FAILURE(rc)) 1909 1912 { 1910 Log (("VBoxGuestCommonIOCtl: VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc!!\n",1911 cbData, cbReq, enmType, rc));1913 LogFlowFunc(("Invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc\n", 1914 cbData, cbReq, enmType, rc)); 1912 1915 return rc; 1913 1916 } … … 1916 1919 if (RT_FAILURE(rc)) 1917 1920 { 1918 Log (("VBoxGuestCommonIOCtl: VMMREQUEST: Operation not allowed! type=%#xrc=%Rrc\n", enmType, rc));1921 LogFlowFunc(("Operation not allowed! type=%#x, rc=%Rrc\n", enmType, rc)); 1919 1922 return rc; 1920 1923 } … … 1930 1933 if (RT_FAILURE(rc)) 1931 1934 { 1932 Log (("VBoxGuestCommonIOCtl: VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",1933 cbReq, cbReq, rc));1935 LogFlowFunc(("Failed to allocate %u (%#x) bytes to cache the request; rc=%Rrc\n", 1936 cbReq, cbReq, rc)); 1934 1937 return rc; 1935 1938 } … … 1951 1954 } 1952 1955 else if (RT_FAILURE(rc)) 1953 Log (("VBoxGuestCommonIOCtl: VMMREQUEST: VbglGRPerform - rc=%Rrc!\n", rc));1956 LogFlowFunc(("VbglGRPerform failed; rc=%Rrc\n", rc)); 1954 1957 else 1955 1958 { 1956 Log(("VBoxGuestCommonIOCtl: VMMREQUEST: request execution failed; VMMDev rc=%Rrc!\n", pReqCopy->rc)); 1959 LogFlowFunc(("Request execution failed; VMMDev rc=%Rrc\n", 1960 pReqCopy->rc)); 1957 1961 rc = pReqCopy->rc; 1958 1962 } … … 2093 2097 && ( !fInterruptible 2094 2098 || rc != VERR_INTERRUPTED)) 2095 LogRel (("VBoxGuestHGCMAsyncWaitCallback:wait failed! %Rrc\n", rc));2099 LogRelFlow(("wait failed! %Rrc\n", rc)); 2096 2100 2097 2101 VBoxGuestWaitFreeUnlocked(pDevExt, pWait); … … 2108 2112 { 2109 2113 PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvUser; 2110 Log (("VBoxGuestHGCMAsyncWaitCallback:requestType=%d\n", pHdr->header.requestType));2114 LogFlowFunc(("requestType=%d\n", pHdr->header.requestType)); 2111 2115 return VBoxGuestHGCMAsyncWaitCallbackWorker((VMMDevHGCMRequestHeader volatile *)pHdr, 2112 2116 pDevExt, … … 2125 2129 { 2126 2130 PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvUser; 2127 Log (("VBoxGuestHGCMAsyncWaitCallbackInterruptible:requestType=%d\n", pHdr->header.requestType));2131 LogFlowFunc(("requestType=%d\n", pHdr->header.requestType)); 2128 2132 return VBoxGuestHGCMAsyncWaitCallbackWorker((VMMDevHGCMRequestHeader volatile *)pHdr, 2129 2133 pDevExt, … … 2144 2148 * to deal with cancelled requests. 2145 2149 */ 2146 Log (("VBoxGuestCommonIOCtl: HGCM_CONNECT:%.128s\n",2147 pInfo->Loc.type == VMMDevHGCMLoc_LocalHost || pInfo->Loc.type == VMMDevHGCMLoc_LocalHost_Existing2148 ? pInfo->Loc.u.host.achName : "<not local host>"));2150 LogFlowFunc(("%.128s\n", 2151 pInfo->Loc.type == VMMDevHGCMLoc_LocalHost || pInfo->Loc.type == VMMDevHGCMLoc_LocalHost_Existing 2152 ? pInfo->Loc.u.host.achName : "<not local host>")); 2149 2153 2150 2154 rc = VbglR0HGCMInternalConnect(pInfo, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT); 2151 2155 if (RT_SUCCESS(rc)) 2152 2156 { 2153 Log (("VBoxGuestCommonIOCtl: HGCM_CONNECT:u32Client=%RX32 result=%Rrc (rc=%Rrc)\n",2154 pInfo->u32ClientID, pInfo->result, rc));2157 LogFlowFunc(("u32Client=%RX32 result=%Rrc (rc=%Rrc)\n", 2158 pInfo->u32ClientID, pInfo->result, rc)); 2155 2159 if (RT_SUCCESS(pInfo->result)) 2156 2160 { … … 2174 2178 2175 2179 if (s_cErrors++ < 32) 2176 LogRel (("VBoxGuestCommonIOCtl: HGCM_CONNECT: too many HGCMConnect calls for one session!\n"));2180 LogRelFunc(("Too many HGCMConnect calls for one session\n")); 2177 2181 2178 2182 Info.result = 0; … … 2210 2214 static unsigned s_cErrors = 0; 2211 2215 if (s_cErrors++ > 32) 2212 LogRel (("VBoxGuestCommonIOCtl: HGCM_DISCONNECT:u32Client=%RX32\n", u32ClientId));2216 LogRelFunc(("u32Client=%RX32\n", u32ClientId)); 2213 2217 return VERR_INVALID_HANDLE; 2214 2218 } … … 2219 2223 * to deal with cancelled requests. 2220 2224 */ 2221 Log (("VBoxGuestCommonIOCtl: HGCM_DISCONNECT:u32Client=%RX32\n", pInfo->u32ClientID));2225 LogFlowFunc(("u32Client=%RX32\n", pInfo->u32ClientID)); 2222 2226 rc = VbglR0HGCMInternalDisconnect(pInfo, VBoxGuestHGCMAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT); 2223 2227 if (RT_SUCCESS(rc)) 2224 2228 { 2225 Log (("VBoxGuestCommonIOCtl: HGCM_DISCONNECT: result=%Rrc\n", pInfo->result));2229 LogFlowFunc(("Disconnected with rc=%Rrc\n", pInfo->result)); /** int32_t vs. int! */ 2226 2230 if (pcbDataReturned) 2227 2231 *pcbDataReturned = sizeof(*pInfo); … … 2255 2259 if (pInfo->cParms > 4096) /* (Just make sure it doesn't overflow the next check.) */ 2256 2260 { 2257 LogRel (("VBoxGuestCommonIOCtl: HGCM_CALL:cParm=%RX32 is not sane\n", pInfo->cParms));2261 LogRelFunc(("cParm=%RX32 is not sane\n", pInfo->cParms)); 2258 2262 return VERR_INVALID_PARAMETER; 2259 2263 } … … 2268 2272 if (cbData < cbActual) 2269 2273 { 2270 LogRel (("VBoxGuestCommonIOCtl: HGCM_CALL:cbData=%#zx (%zu) required size is %#zx (%zu)\n",2271 cbData, cbData, cbActual, cbActual));2274 LogRelFunc(("cbData=%#zx (%zu) required size is %#zx (%zu)\n", 2275 cbData, cbData, cbActual, cbActual)); 2272 2276 return VERR_INVALID_PARAMETER; 2273 2277 } … … 2285 2289 static unsigned s_cErrors = 0; 2286 2290 if (s_cErrors++ > 32) 2287 LogRel (("VBoxGuestCommonIOCtl: HGCM_CALL: Invalid handle.u32Client=%RX32\n", u32ClientId));2291 LogRelFunc(("Invalid handle; u32Client=%RX32\n", u32ClientId)); 2288 2292 return VERR_INVALID_HANDLE; 2289 2293 } … … 2295 2299 * be interruptible (should add a flag for this later I guess). 2296 2300 */ 2297 Log (("VBoxGuestCommonIOCtl: HGCM_CALL:u32Client=%RX32\n", pInfo->u32ClientID));2301 LogFlowFunc(("u32Client=%RX32\n", pInfo->u32ClientID)); 2298 2302 fFlags = !fUserData && pSession->R0Process == NIL_RTR0PROCESS ? VBGLR0_HGCMCALL_F_KERNEL : VBGLR0_HGCMCALL_F_USER; 2299 2303 #ifdef RT_ARCH_AMD64 … … 2315 2319 if (RT_SUCCESS(rc)) 2316 2320 { 2317 Log (("VBoxGuestCommonIOCtl: HGCM_CALL: result=%Rrc\n", pInfo->result));2321 LogFlowFunc(("Result rc=%Rrc\n", pInfo->result)); /** int32_t vs. int! */ 2318 2322 if (pcbDataReturned) 2319 2323 *pcbDataReturned = cbActual; … … 2326 2330 static unsigned s_cErrors = 0; 2327 2331 if (s_cErrors++ < 32) 2328 LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc)); 2332 LogRelFunc(("%s-bit call failed; rc=%Rrc\n", 2333 f32bit ? "32" : "64", rc)); 2329 2334 } 2330 2335 else 2331 Log(("VBoxGuestCommonIOCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc)); 2336 LogFlowFunc(("%s-bit call failed; rc=%Rrc\n", 2337 f32bit ? "32" : "64", rc)); 2332 2338 } 2333 2339 return rc; 2334 2340 } 2335 2336 2337 2341 #endif /* VBOX_WITH_HGCM */ 2342 2338 2343 2339 2344 /** … … 2355 2360 VBoxGuestCheckBalloonInfo *pInfo, size_t *pcbDataReturned) 2356 2361 { 2357 VMMDevGetMemBalloonChangeRequest *pReq; 2358 int rc; 2359 2360 Log(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON\n")); 2361 rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx); 2362 LogFlowFuncEnter(); 2363 2364 int rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx); 2362 2365 AssertRCReturn(rc, rc); 2363 2366 … … 2368 2371 if ( pDevExt->MemBalloon.pOwner != pSession 2369 2372 && pDevExt->MemBalloon.pOwner == NULL) 2373 { 2370 2374 pDevExt->MemBalloon.pOwner = pSession; 2375 } 2371 2376 2372 2377 if (pDevExt->MemBalloon.pOwner == pSession) 2373 2378 { 2374 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest), VMMDevReq_GetMemBalloonChangeRequest); 2379 VMMDevGetMemBalloonChangeRequest *pReq; 2380 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest), 2381 VMMDevReq_GetMemBalloonChangeRequest); 2375 2382 if (RT_SUCCESS(rc)) 2376 2383 { … … 2401 2408 } 2402 2409 else 2403 LogRel (("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON: VbglGRPerform failed.rc=%Rrc\n", rc));2410 LogRelFunc(("VbglGRPerform failed; rc=%Rrc\n", rc)); 2404 2411 VbglGRFree(&pReq->header); 2405 2412 } … … 2409 2416 2410 2417 RTSemFastMutexRelease(pDevExt->MemBalloon.hMtx); 2411 Log(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON returns %Rrc\n", rc)); 2418 2419 LogFlowFunc(("Returns %Rrc\n", rc)); 2412 2420 return rc; 2413 2421 } … … 2443 2451 if (pDevExt->MemBalloon.pOwner == pSession) 2444 2452 { 2445 rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, pInfo->u64ChunkAddr, !!pInfo->fInflate); 2453 rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, pInfo->u64ChunkAddr, 2454 !!pInfo->fInflate); 2446 2455 if (pcbDataReturned) 2447 2456 *pcbDataReturned = 0; … … 2469 2478 { 2470 2479 VMMDevReqWriteCoreDump *pReq = NULL; 2471 int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump); 2480 int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevReqWriteCoreDump), 2481 VMMDevReq_WriteCoreDump); 2472 2482 if (RT_FAILURE(rc)) 2473 2483 { 2474 Log (("VBoxGuestCommonIOCtl: WRITE_CORE_DUMP: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",2475 sizeof(*pReq), sizeof(*pReq), rc));2484 LogFlowFunc(("Failed to allocate %u (%#x) bytes to cache the request; rc=%Rrc\n", 2485 sizeof(VMMDevReqWriteCoreDump), sizeof(VMMDevReqWriteCoreDump), rc)); 2476 2486 return rc; 2477 2487 } … … 2480 2490 rc = VbglGRPerform(&pReq->header); 2481 2491 if (RT_FAILURE(rc)) 2482 Log (("VBoxGuestCommonIOCtl: WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc));2492 LogFlowFunc(("VbglGRPerform failed, rc=%Rrc\n", rc)); 2483 2493 2484 2494 VbglGRFree(&pReq->header); … … 2609 2619 if (!VBoxGuestCommonGuestCapsValidateValues(fOrMask)) 2610 2620 { 2611 LogRel (("VBoxGuestCommonGuestCapsAcquire:pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid fOrMask\n",2612 pSession, fOrMask, fNotMask, enmFlags));2621 LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid fOrMask\n", 2622 pSession, fOrMask, fNotMask, enmFlags)); 2613 2623 return VERR_INVALID_PARAMETER; 2614 2624 } … … 2617 2627 && enmFlags != VBOXGUESTCAPSACQUIRE_FLAGS_NONE) 2618 2628 { 2619 LogRel (("VBoxGuestCommonGuestCapsAcquire:pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid enmFlags %d\n",2620 pSession, fOrMask, fNotMask, enmFlags));2629 LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- invalid enmFlags %d\n", 2630 pSession, fOrMask, fNotMask, enmFlags)); 2621 2631 return VERR_INVALID_PARAMETER; 2622 2632 } … … 2624 2634 if (!VBoxGuestCommonGuestCapsModeSet(pDevExt, fOrMask, true, &fSetCaps)) 2625 2635 { 2626 LogRel (("VBoxGuestCommonGuestCapsAcquire:pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- calling caps acquire for set caps\n",2627 pSession, fOrMask, fNotMask, enmFlags));2636 LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- calling caps acquire for set caps\n", 2637 pSession, fOrMask, fNotMask, enmFlags)); 2628 2638 return VERR_INVALID_STATE; 2629 2639 } … … 2631 2641 if (enmFlags & VBOXGUESTCAPSACQUIRE_FLAGS_CONFIG_ACQUIRE_MODE) 2632 2642 { 2633 Log (("VBoxGuestCommonGuestCapsAcquire:pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- configured acquire caps: 0x%x\n",2634 pSession, fOrMask, fNotMask, enmFlags));2643 LogRelFunc(("pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x) -- configured acquire caps: 0x%x\n", 2644 pSession, fOrMask, fNotMask, enmFlags)); 2635 2645 return VINF_SUCCESS; 2636 2646 } … … 2672 2682 if (fOtherConflictingCaps) 2673 2683 { 2674 Log (("VBoxGuest:Caps 0x%x were busy\n", fOtherConflictingCaps));2684 LogFlowFunc(("Caps 0x%x were busy\n", fOtherConflictingCaps)); 2675 2685 return VERR_RESOURCE_BUSY; 2676 2686 } … … 2686 2696 if (RT_FAILURE(rc)) 2687 2697 { 2688 LogRel (("VBoxGuestCommonGuestCapsAcquire:VBoxGuestSetGuestCapabilities failed, rc=%Rrc\n", rc));2698 LogRelFunc(("VBoxGuestSetGuestCapabilities failed, rc=%Rrc\n", rc)); 2689 2699 2690 2700 /* Failure branch … … 2717 2727 int rc = VBoxGuestCommonGuestCapsAcquire(pDevExt, pSession, pAcquire->u32OrMask, pAcquire->u32NotMask, pAcquire->enmFlags); 2718 2728 if (RT_FAILURE(rc)) 2719 LogRel (("VBoxGuestCommonGuestCapsAcquire: failedrc=%Rrc\n", rc));2729 LogRelFunc(("Failed, rc=%Rrc\n", rc)); 2720 2730 pAcquire->rc = rc; 2721 2731 return VINF_SUCCESS; … … 2742 2752 { 2743 2753 int rc; 2744 Log (("VBoxGuestCommonIOCtl: iFunction=%#x pDevExt=%p pSession=%p pvData=%pcbData=%zu\n",2745 iFunction, pDevExt, pSession, pvData, cbData));2754 LogFlowFunc(("iFunction=%#x, pDevExt=%p, pSession=%p, pvData=%p, cbData=%zu\n", 2755 iFunction, pDevExt, pSession, pvData, cbData)); 2746 2756 2747 2757 /* … … 2963 2973 default: 2964 2974 { 2965 LogRel (("VBoxGuestCommonIOCtl: Unknown request iFunction=%#xstripped size=%#x\n",2966 iFunction, VBOXGUEST_IOCTL_STRIP_SIZE(iFunction)));2975 LogRelFunc(("Unknown request iFunction=%#x, stripped size=%#x\n", 2976 iFunction, VBOXGUEST_IOCTL_STRIP_SIZE(iFunction))); 2967 2977 rc = VERR_NOT_SUPPORTED; 2968 2978 break; … … 2971 2981 } 2972 2982 2973 Log (("VBoxGuestCommonIOCtl: returns%Rrc *pcbDataReturned=%zu\n", rc, pcbDataReturned ? *pcbDataReturned : 0));2983 LogFlowFunc(("Returning %Rrc *pcbDataReturned=%zu\n", rc, pcbDataReturned ? *pcbDataReturned : 0)); 2974 2984 return rc; 2975 2985 } … … 3020 3030 PVBOXGUESTWAIT pSafe; 3021 3031 3022 Log 3(("VBoxGuestCommonISR: acknowledge events succeeded%#RX32\n", fEvents));3032 LogFlowFunc(("Acknowledge events succeeded: %#RX32\n", fEvents)); 3023 3033 3024 3034 /* … … 3086 3096 } 3087 3097 else /* something is serious wrong... */ 3088 Log(("VBoxGuestCommonISR: acknowledge events failed rc=%Rrc (events=%#x)!!\n", 3089 pReq->header.rc, pReq->events)); 3090 } 3098 LogFlowFunc(("Acknowledging events failed, rc=%Rrc (events=%#x)\n", 3099 pReq->header.rc, pReq->events)); 3100 } 3101 #ifndef DEBUG_andy 3091 3102 else 3092 LogFlow(("VBoxGuestCommonISR: not ours\n")); 3103 LogFlowFunc(("Not ours\n")); 3104 #endif 3093 3105 3094 3106 RTSpinlockReleaseNoInts(pDevExt->EventSpinlock);
Note:
See TracChangeset
for help on using the changeset viewer.