Index: /trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
===================================================================
--- /trunk/src/VBox/Devices/VMMDev/VMMDev.cpp	(revision 54006)
+++ /trunk/src/VBox/Devices/VMMDev/VMMDev.cpp	(revision 54007)
@@ -832,21 +832,21 @@
     AssertMsgReturn(pReq->header.size == sizeof(*pReq), ("%u\n", pReq->header.size), VERR_INVALID_PARAMETER);
 
-    /* Enable this automatically for guests using the old
-       request to report their capabilities. */
-    /** @todo change this when we next bump the interface version */
-    pReq->caps |= VMMDEV_GUEST_SUPPORTS_GRAPHICS;
-    if (pThis->guestCaps != pReq->caps)
+    /* Enable VMMDEV_GUEST_SUPPORTS_GRAPHICS automatically for guests using the old
+     * request to report their capabilities.
+     */
+    const uint32_t fu32Caps = pReq->caps | VMMDEV_GUEST_SUPPORTS_GRAPHICS;
+
+    if (pThis->guestCaps != fu32Caps)
     {
         /* make a copy of supplied information */
-        pThis->guestCaps = pReq->caps;
-
-        LogRel(("Guest Additions capability report: (0x%x) seamless: %s, hostWindowMapping: %s, graphics: %s\n",
-                pReq->caps,
-                pReq->caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
-                pReq->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no",
-                pReq->caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no"));
+        pThis->guestCaps = fu32Caps;
+
+        LogRel(("Guest Additions capability report (legacy): (0x%x) seamless: %s, hostWindowMapping: %s, graphics: yes\n",
+                fu32Caps,
+                fu32Caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
+                fu32Caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no"));
 
         if (pThis->pDrv && pThis->pDrv->pfnUpdateGuestCapabilities)
-            pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, pReq->caps);
+            pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, fu32Caps);
     }
     return VINF_SUCCESS;
@@ -866,16 +866,18 @@
     AssertMsgReturn(pReq->header.size == sizeof(*pReq), ("%u\n", pReq->header.size), VERR_INVALID_PARAMETER);
 
-    uint32_t const fOldCaps = pThis->guestCaps; NOREF(fOldCaps);
-    pThis->guestCaps |= pReq->u32OrMask;
-    pThis->guestCaps &= ~pReq->u32NotMask;
+    uint32_t fu32Caps = pThis->guestCaps;
+    fu32Caps |= pReq->u32OrMask;
+    fu32Caps &= ~pReq->u32NotMask;
 
     LogRel(("Guest Additions capability report: (%#x -> %#x) seamless: %s, hostWindowMapping: %s, graphics: %s\n",
-            fOldCaps, pThis->guestCaps,
-            pThis->guestCaps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
-            pThis->guestCaps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no",
-            pThis->guestCaps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no"));
+            pThis->guestCaps, fu32Caps,
+            fu32Caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
+            fu32Caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no",
+            fu32Caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no"));
+
+    pThis->guestCaps = fu32Caps;
 
     if (pThis->pDrv && pThis->pDrv->pfnUpdateGuestCapabilities)
-        pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, pThis->guestCaps);
+        pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, fu32Caps);
 
     return VINF_SUCCESS;
@@ -3671,4 +3673,6 @@
     memset (&pThis->guestInfo, 0, sizeof (pThis->guestInfo));
     RT_ZERO(pThis->guestInfo2);
+    const bool fCapsChanged = pThis->guestCaps != 0; /* Report transition to 0. */
+    pThis->guestCaps = 0;
 
     /* Clear facilities. No need to tell Main as it will get a
@@ -3719,11 +3723,4 @@
     pThis->fNewGuestFilterMask   = 0;
 
-    /* This is the default, as Windows and OS/2 guests take this for granted. (Actually, neither does...) */
-    /** @todo change this when we next bump the interface version */
-    const bool fCapsChanged = pThis->guestCaps != VMMDEV_GUEST_SUPPORTS_GRAPHICS;
-    if (fCapsChanged)
-        Log(("vmmdevReset: fCapsChanged=%#x -> %#x\n", pThis->guestCaps, VMMDEV_GUEST_SUPPORTS_GRAPHICS));
-    pThis->guestCaps = VMMDEV_GUEST_SUPPORTS_GRAPHICS; /** @todo r=bird: why? I cannot see this being done at construction?*/
-
     /*
      * Call the update functions as required.
@@ -3731,5 +3728,5 @@
     if (fVersionChanged && pThis->pDrv && pThis->pDrv->pfnUpdateGuestInfo)
         pThis->pDrv->pfnUpdateGuestInfo(pThis->pDrv, &pThis->guestInfo);
-    if (fCapsChanged    && pThis->pDrv && pThis->pDrv->pfnUpdateGuestCapabilities)
+    if (fCapsChanged && pThis->pDrv && pThis->pDrv->pfnUpdateGuestCapabilities)
         pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, pThis->guestCaps);
 
