Index: /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 54614)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 54615)
@@ -64,20 +64,4 @@
 *******************************************************************************/
 #define VBOXGUEST_ACQUIRE_STYLE_EVENTS (VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST | VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST)
-
-
-/*******************************************************************************
-*   Structures and Typedefs                                                    *
-*******************************************************************************/
-/** Host flags to be updated by a given invocation of the
- * vboxGuestUpdateHostFlags() method. */
-/** @todo r=bird: Use RT_BIT_32 for the bits, preferably replace enum with
- *        \#define. */
-enum
-{
-    HostFlags_FilterMask   = 1,
-    HostFlags_MouseStatus  = 4,
-    HostFlags_All          = 7,
-    HostFlags_SizeHack = (unsigned)-1
-};
 
 
@@ -1527,5 +1511,5 @@
 static int vbgdIoCtl_GetVMMDevPort(PVBOXGUESTDEVEXT pDevExt, VBoxGuestPortInfo *pInfo, size_t *pcbDataReturned)
 {
-    LogFlow(("VbgdCommonIoCtl: GETVMMDEVPORT\n"));
+    LogFlow(("VBOXGUEST_IOCTL_GETVMMDEVPORT\n"));
 
     pInfo->portAddress = pDevExt->IOPortBase;
@@ -1547,5 +1531,5 @@
 int vbgdIoCtl_SetMouseNotifyCallback(PVBOXGUESTDEVEXT pDevExt, VBoxGuestMouseSetNotifyCallback *pNotify)
 {
-    LogFlow(("VbgdCommonIoCtl: SET_MOUSE_NOTIFY_CALLBACK\n"));
+    LogFlow(("VBOXGUEST_IOCTL_SET_MOUSE_NOTIFY_CALLBACK: pfnNotify=%p pvUser=%p\n", pNotify->pfnNotify, pNotify->pvUser));
 
     RTSpinlockAcquire(pDevExt->EventSpinlock);
@@ -1578,7 +1562,7 @@
         pInfo->u32Result = VBOXGUEST_WAITEVENT_OK;
         if (fReqEvents & ~((uint32_t)1 << iEvent))
-            LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));
+            LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));
         else
-            LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
+            LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
         pSession->fPendingCancelWaitEvents = false;
         return VINF_SUCCESS;
@@ -1610,5 +1594,5 @@
     if (RT_UNLIKELY(iEvent < 0))
     {
-        LogRel(("VbgdCommonIoCtl: WAITEVENT: Invalid input mask %#x!!\n", fReqEvents));
+        LogRel(("VBOXGUEST_IOCTL_WAITEVENT: Invalid input mask %#x!!\n", fReqEvents));
         return VERR_INVALID_PARAMETER;
     }
@@ -1625,5 +1609,5 @@
     {
         pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT;
-        LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns VERR_TIMEOUT\n"));
+        LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns VERR_TIMEOUT\n"));
         return VERR_TIMEOUT;
     }
@@ -1680,7 +1664,7 @@
         pInfo->u32Result = VBOXGUEST_WAITEVENT_OK;
         if (fReqEvents & ~((uint32_t)1 << iEvent))
-            LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));
+            LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));
         else
-            LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
+            LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));
         rc = VINF_SUCCESS;
     }
@@ -1690,10 +1674,10 @@
         pInfo->u32Result = VBOXGUEST_WAITEVENT_INTERRUPTED;
         rc = VERR_INTERRUPTED;
-        LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns VERR_INTERRUPTED\n"));
+        LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns VERR_INTERRUPTED\n"));
     }
     else if (rc == VERR_TIMEOUT)
     {
         pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT;
-        LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns VERR_TIMEOUT (2)\n"));
+        LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns VERR_TIMEOUT (2)\n"));
     }
     else
@@ -1701,9 +1685,9 @@
         if (RT_SUCCESS(rc))
         {
-            LogRelMax(32, ("VbgdCommonIoCtl: WAITEVENT: returns %Rrc but no events!\n", rc));
+            LogRelMax(32, ("VBOXGUEST_IOCTL_WAITEVENT: returns %Rrc but no events!\n", rc));
             rc = VERR_INTERNAL_ERROR;
         }
         pInfo->u32Result = VBOXGUEST_WAITEVENT_ERROR;
-        LogFlow(("VbgdCommonIoCtl: WAITEVENT: returns %Rrc\n", rc));
+        LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %Rrc\n", rc));
     }
 
@@ -1723,5 +1707,5 @@
     bool                    fCancelledOne = false;
 
-    LogFlow(("VbgdCommonIoCtl: CANCEL_ALL_WAITEVENTS\n"));
+    LogFlow(("VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS\n"));
 
     /*
@@ -1756,4 +1740,5 @@
     return VINF_SUCCESS;
 }
+
 
 /**
@@ -1923,9 +1908,9 @@
     const uint32_t          cbMinSize = (uint32_t)vmmdevGetRequestSize(enmType);
 
-    LogFlow(("VbgdCommonIoCtl: VMMREQUEST type %d\n", pReqHdr->requestType));
+    LogFlow(("VBOXGUEST_IOCTL_VMMREQUEST: type %d\n", pReqHdr->requestType));
 
     if (cbReq < cbMinSize)
     {
-        LogRel(("VbgdCommonIoCtl: VMMREQUEST: invalid hdr size %#x, expected >= %#x; type=%#x!!\n",
+        LogRel(("VBOXGUEST_IOCTL_VMMREQUEST: invalid hdr size %#x, expected >= %#x; type=%#x!!\n",
                 cbReq, cbMinSize, enmType));
         return VERR_INVALID_PARAMETER;
@@ -1933,5 +1918,5 @@
     if (cbReq > cbData)
     {
-        LogRel(("VbgdCommonIoCtl: VMMREQUEST: invalid size %#x, expected >= %#x (hdr); type=%#x!!\n",
+        LogRel(("VBOXGUEST_IOCTL_VMMREQUEST: invalid size %#x, expected >= %#x (hdr); type=%#x!!\n",
                 cbData, cbReq, enmType));
         return VERR_INVALID_PARAMETER;
@@ -1940,5 +1925,5 @@
     if (RT_FAILURE(rc))
     {
-        Log(("VbgdCommonIoCtl: VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc!!\n",
+        Log(("VBOXGUEST_IOCTL_VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc!!\n",
              cbData, cbReq, enmType, rc));
         return rc;
@@ -1948,5 +1933,5 @@
     if (RT_FAILURE(rc))
     {
-        Log(("VbgdCommonIoCtl: VMMREQUEST: Operation not allowed! type=%#x rc=%Rrc\n", enmType, rc));
+        Log(("VBOXGUEST_IOCTL_VMMREQUEST: Operation not allowed! type=%#x rc=%Rrc\n", enmType, rc));
         return rc;
     }
@@ -1962,5 +1947,5 @@
     if (RT_FAILURE(rc))
     {
-        Log(("VbgdCommonIoCtl: VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",
+        Log(("VBOXGUEST_IOCTL_VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",
              cbReq, cbReq, rc));
         return rc;
@@ -1972,6 +1957,6 @@
 
     rc = VbglGRPerform(pReqCopy);
-    if (    RT_SUCCESS(rc)
-        &&  RT_SUCCESS(pReqCopy->rc))
+    if (   RT_SUCCESS(rc)
+        && RT_SUCCESS(pReqCopy->rc))
     {
         Assert(rc != VINF_HGCM_ASYNC_EXECUTE);
@@ -1983,8 +1968,8 @@
     }
     else if (RT_FAILURE(rc))
-        Log(("VbgdCommonIoCtl: VMMREQUEST: VbglGRPerform - rc=%Rrc!\n", rc));
+        Log(("VBOXGUEST_IOCTL_VMMREQUEST: VbglGRPerform - rc=%Rrc!\n", rc));
     else
     {
-        Log(("VbgdCommonIoCtl: VMMREQUEST: request execution failed; VMMDev rc=%Rrc!\n", pReqCopy->rc));
+        Log(("VBOXGUEST_IOCTL_VMMREQUEST: request execution failed; VMMDev rc=%Rrc!\n", pReqCopy->rc));
         rc = pReqCopy->rc;
     }
@@ -2058,8 +2043,8 @@
      * Unlink, free and return.
      */
-    if (    RT_FAILURE(rc)
-        &&  rc != VERR_TIMEOUT
-        &&  (    !fInterruptible
-             ||  rc != VERR_INTERRUPTED))
+    if (   RT_FAILURE(rc)
+        && rc != VERR_TIMEOUT
+        && (   !fInterruptible
+            || rc != VERR_INTERRUPTED))
         LogRel(("vbgdHgcmAsyncWaitCallback: wait failed! %Rrc\n", rc));
 
@@ -2107,5 +2092,5 @@
      * to deal with cancelled requests.
      */
-    Log(("VbgdCommonIoCtl: HGCM_CONNECT: %.128s\n",
+    Log(("VBOXGUEST_IOCTL_HGCM_CONNECT: %.128s\n",
          pInfo->Loc.type == VMMDevHGCMLoc_LocalHost || pInfo->Loc.type == VMMDevHGCMLoc_LocalHost_Existing
          ? pInfo->Loc.u.host.achName : "<not local host>"));
@@ -2114,5 +2099,5 @@
     if (RT_SUCCESS(rc))
     {
-        Log(("VbgdCommonIoCtl: HGCM_CONNECT: u32Client=%RX32 result=%Rrc (rc=%Rrc)\n",
+        Log(("VBOXGUEST_IOCTL_HGCM_CONNECT: u32Client=%RX32 result=%Rrc (rc=%Rrc)\n",
              pInfo->u32ClientID, pInfo->result, rc));
         if (RT_SUCCESS(pInfo->result))
@@ -2134,5 +2119,5 @@
             {
                 VBoxGuestHGCMDisconnectInfo Info;
-                LogRelMax(32, ("VbgdCommonIoCtl: HGCM_CONNECT: too many HGCMConnect calls for one session!\n"));
+                LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_CONNECT: too many HGCMConnect calls for one session!\n"));
                 Info.result = 0;
                 Info.u32ClientID = pInfo->u32ClientID;
@@ -2169,5 +2154,5 @@
     if (i >= RT_ELEMENTS(pSession->aHGCMClientIds))
     {
-        LogRelMax(32, ("VbgdCommonIoCtl: HGCM_DISCONNECT: u32Client=%RX32\n", u32ClientId));
+        LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_DISCONNECT: u32Client=%RX32\n", u32ClientId));
         return VERR_INVALID_HANDLE;
     }
@@ -2178,9 +2163,9 @@
      * to deal with cancelled requests.
      */
-    Log(("VbgdCommonIoCtl: HGCM_DISCONNECT: u32Client=%RX32\n", pInfo->u32ClientID));
+    Log(("VBOXGUEST_IOCTL_HGCM_DISCONNECT: u32Client=%RX32\n", pInfo->u32ClientID));
     rc = VbglR0HGCMInternalDisconnect(pInfo, vbgdHgcmAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT);
     if (RT_SUCCESS(rc))
     {
-        LogFlow(("VbgdCommonIoCtl: HGCM_DISCONNECT: result=%Rrc\n", pInfo->result));
+        LogFlow(("VBOXGUEST_IOCTL_HGCM_DISCONNECT: result=%Rrc\n", pInfo->result));
         if (pcbDataReturned)
             *pcbDataReturned = sizeof(*pInfo);
@@ -2212,5 +2197,5 @@
     if (pInfo->cParms > 4096) /* (Just make sure it doesn't overflow the next check.) */
     {
-        LogRel(("VbgdCommonIoCtl: HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms));
+        LogRel(("VBOXGUEST_IOCTL_HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms));
         return VERR_INVALID_PARAMETER;
     }
@@ -2225,5 +2210,5 @@
     if (cbData < cbActual)
     {
-        LogRel(("VbgdCommonIoCtl: HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n",
+        LogRel(("VBOXGUEST_IOCTL_HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n",
                cbData, cbData, cbActual, cbActual));
         return VERR_INVALID_PARAMETER;
@@ -2240,5 +2225,5 @@
     if (RT_UNLIKELY(i >= RT_ELEMENTS(pSession->aHGCMClientIds)))
     {
-        LogRelMax(32, ("VbgdCommonIoCtl: HGCM_CALL: Invalid handle. u32Client=%RX32\n", u32ClientId));
+        LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_CALL: Invalid handle. u32Client=%RX32\n", u32ClientId));
         return VERR_INVALID_HANDLE;
     }
@@ -2250,5 +2235,5 @@
      * be interruptible (should add a flag for this later I guess).
      */
-    LogFlow(("VbgdCommonIoCtl: HGCM_CALL: u32Client=%RX32\n", pInfo->u32ClientID));
+    LogFlow(("VBOXGUEST_IOCTL_HGCM_CALL: u32Client=%RX32\n", pInfo->u32ClientID));
     fFlags = !fUserData && pSession->R0Process == NIL_RTR0PROCESS ? VBGLR0_HGCMCALL_F_KERNEL : VBGLR0_HGCMCALL_F_USER;
     uint32_t cbInfo = (uint32_t)(cbData - cbExtra);
@@ -2271,5 +2256,5 @@
     if (RT_SUCCESS(rc))
     {
-        LogFlow(("VbgdCommonIoCtl: HGCM_CALL: result=%Rrc\n", pInfo->result));
+        LogFlow(("VBOXGUEST_IOCTL_HGCM_CALL: result=%Rrc\n", pInfo->result));
         if (pcbDataReturned)
             *pcbDataReturned = cbActual;
@@ -2279,7 +2264,7 @@
         if (   rc != VERR_INTERRUPTED
             && rc != VERR_TIMEOUT)
-            LogRelMax(32, ("VbgdCommonIoCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
+            LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
         else
-            Log(("VbgdCommonIoCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
+            Log(("VBOXGUEST_IOCTL_HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
     }
     return rc;
@@ -2309,5 +2294,5 @@
     int rc;
 
-    LogFlow(("VbgdCommonIoCtl: CHECK_MEMORY_BALLOON\n"));
+    LogFlow(("VBOXGUEST_IOCTL_CHECK_BALLOON:\n"));
     rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx);
     AssertRCReturn(rc, rc);
@@ -2352,5 +2337,5 @@
             }
             else
-                LogRel(("VbgdCommonIoCtl: CHECK_MEMORY_BALLOON: VbglGRPerform failed. rc=%Rrc\n", rc));
+                LogRel(("VBOXGUEST_IOCTL_CHECK_BALLOON: VbglGRPerform failed. rc=%Rrc\n", rc));
             VbglGRFree(&pReq->header);
         }
@@ -2360,5 +2345,5 @@
 
     RTSemFastMutexRelease(pDevExt->MemBalloon.hMtx);
-    LogFlow(("VbgdCommonIoCtl: CHECK_MEMORY_BALLOON returns %Rrc\n", rc));
+    LogFlow(("VBOXGUEST_IOCTL_CHECK_BALLOON returns %Rrc\n", rc));
     return rc;
 }
@@ -2380,6 +2365,6 @@
 {
     int rc;
-
-    LogFlow(("VbgdCommonIoCtl: CHANGE_BALLOON\n"));
+    LogFlow(("VBOXGUEST_IOCTL_CHANGE_BALLOON: fInflate=%RTbool u64ChunkAddr=%#RX64\n", pInfo->fInflate, pInfo->u64ChunkAddr));
+
     rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx);
     AssertRCReturn(rc, rc);
@@ -2424,20 +2409,19 @@
     VMMDevReqWriteCoreDump *pReq = NULL;
     int rc;
-
-    LogFlow(("VbgdCommonIoCtl: WRITE_CORE_DUMP\n"));
+    LogFlow(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP\n"));
+
     rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump);
-    if (RT_FAILURE(rc))
-    {
-        Log(("VbgdCommonIoCtl: WRITE_CORE_DUMP: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",
+    if (RT_SUCCESS(rc))
+    {
+        pReq->fFlags = pInfo->fFlags;
+        rc = VbglGRPerform(&pReq->header);
+        if (RT_FAILURE(rc))
+            Log(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc));
+
+        VbglGRFree(&pReq->header);
+    }
+    else
+        Log(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",
              sizeof(*pReq), sizeof(*pReq), rc));
-        return rc;
-    }
-
-    pReq->fFlags = pInfo->fFlags;
-    rc = VbglGRPerform(&pReq->header);
-    if (RT_FAILURE(rc))
-        Log(("VbgdCommonIoCtl: WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc));
-
-    VbglGRFree(&pReq->header);
     return rc;
 }
@@ -2456,6 +2440,4 @@
 static int vbgdIoCtl_Log(PVBOXGUESTDEVEXT pDevExt, const char *pch, size_t cbData, size_t *pcbDataReturned, bool fUserSession)
 {
-    NOREF(pch);
-    NOREF(cbData);
     if (pDevExt->fLoggingEnabled)
         RTLogBackdoorPrintf("%.*s", cbData, pch);
@@ -2712,9 +2694,9 @@
 static int vbgdIoCtl_CtlFilterMask(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, VBoxGuestFilterMaskInfo *pInfo)
 {
-    LogFlow(("VbgdCommonIoCtl: CTL_FILTER_MASK or=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask));
+    LogFlow(("VBOXGUEST_IOCTL_CTL_FILTER_MASK: or=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask));
 
     if ((pInfo->u32OrMask | pInfo->u32NotMask) & ~VMMDEV_EVENT_VALID_EVENT_MASK)
     {
-        Log(("VbgdCommonIoCtl: CTL_FILTER_MASK or=%#x not=%#x: Invalid masks!\n", pInfo->u32OrMask, pInfo->u32NotMask));
+        Log(("VBOXGUEST_IOCTL_CTL_FILTER_MASK: or=%#x not=%#x: Invalid masks!\n", pInfo->u32OrMask, pInfo->u32NotMask));
         return VERR_INVALID_PARAMETER;
     }
@@ -2863,5 +2845,5 @@
 {
     int rc;
-    LogFlow(("VbgdCommonIoCtl: CTL_FILTER_MASK features=%#x\n", fFeatures));
+    LogFlow(("VBOXGUEST_IOCTL_SET_MOUSE_STATUS: features=%#x\n", fFeatures));
 
     if (fFeatures & ~VMMDEV_MOUSE_GUEST_MASK)
@@ -3205,5 +3187,5 @@
 {
     int rc;
-    LogFlow(("VbgdCommonIoCtl: GUEST_CAPS_ACQUIRE or=%#x not=%#x flags=%#x\n",
+    LogFlow(("VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE: or=%#x not=%#x flags=%#x\n",
              pAcquire->u32OrMask, pAcquire->u32NotMask, pAcquire->enmFlags));
 
@@ -3323,5 +3305,5 @@
 {
     int rc;
-    LogFlow(("VbgdCommonIoCtl: SET_GUEST_CAPABILITIES or=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask));
+    LogFlow(("VBOXGUEST_IOCTL_SET_GUEST_CAPABILITIES: or=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask));
 
     if (!((pInfo->u32OrMask | pInfo->u32NotMask) & ~VMMDEV_GUEST_CAPABILITIES_MASK))
@@ -3494,6 +3476,5 @@
 
             case VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS:
-                if (cbData != 0)
-                    rc = VERR_INVALID_PARAMETER;
+                CHECKRET_SIZE("CANCEL_ALL_WAITEVENTS", 0);
                 rc = vbgdIoCtl_CancelAllWaitEvents(pDevExt, pSession);
                 break;
Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp	(revision 54614)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp	(revision 54615)
@@ -37,5 +37,5 @@
     if (!pReq || cbReq < sizeof (VMMDevRequestHeader))
     {
-        dprintf(("VbglGRVerify: Invalid parameter: pReq = %p, cbReq = %d\n", pReq, cbReq));
+        dprintf(("VbglGRVerify: Invalid parameter: pReq = %p, cbReq = %zu\n", pReq, cbReq));
         return VERR_INVALID_PARAMETER;
     }
@@ -43,5 +43,5 @@
     if (pReq->size > cbReq)
     {
-        dprintf(("VbglGRVerify: request size %d > buffer size %d\n", pReq->size, cbReq));
+        dprintf(("VbglGRVerify: request size %u > buffer size %zu\n", pReq->size, cbReq));
         return VERR_INVALID_PARAMETER;
     }
@@ -52,5 +52,5 @@
     if (cbReq < cbReqExpected)
     {
-        dprintf(("VbglGRVerify: buffer size %d < expected size %d\n", cbReq, cbReqExpected));
+        dprintf(("VbglGRVerify: buffer size %zu < expected size %zu\n", cbReq, cbReqExpected));
         return VERR_INVALID_PARAMETER;
     }
@@ -63,5 +63,5 @@
         if (pReq->size != cbReqExpected)
         {
-            dprintf(("VbglGRVerify: request size %d != expected size %d\n", pReq->size, cbReqExpected));
+            dprintf(("VbglGRVerify: request size %u != expected size %zu\n", pReq->size, cbReqExpected));
             return VERR_INVALID_PARAMETER;
         }
@@ -91,5 +91,5 @@
         if (cbReq > VMMDEV_MAX_VMMDEVREQ_SIZE)
         {
-            dprintf(("VbglGRVerify: VMMDevReq_LogString: buffer size %d too big\n", cbReq));
+            dprintf(("VbglGRVerify: VMMDevReq_LogString: buffer size %zu too big\n", cbReq));
             return VERR_BUFFER_OVERFLOW; /* @todo is this error code ok? */
         }
@@ -97,5 +97,5 @@
     else
     {
-        dprintf(("VbglGRVerify: request size %d > buffer size %d\n", pReq->size, cbReq));
+        dprintf(("VbglGRVerify: request size %u > buffer size %zu\n", pReq->size, cbReq));
         return VERR_IO_BAD_LENGTH; /* @todo is this error code ok? */
     }
