Index: trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
===================================================================
--- trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp	(revision 83277)
+++ trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp	(revision 83278)
@@ -991,30 +991,10 @@
         case SVGA_REG_HOST_BITS_PER_PIXEL: /* (Deprecated) */
             STAM_REL_COUNTER_INC(&pThis->svga.StatRegHostBitsPerPixelRd);
-            if (    pThis->svga.fEnabled
-                &&  pThis->svga.uBpp != VMSVGA_VAL_UNINITIALIZED)
-                *pu32 = pThis->svga.uBpp;
-            else
-            {
-#ifndef IN_RING3
-                rc = VINF_IOM_R3_IOPORT_READ;
-#else
-                *pu32 = pThisCC->pDrv->cBits;
-#endif
-            }
+            *pu32 = pThis->svga.uHostBpp;
             break;
 
         case SVGA_REG_BITS_PER_PIXEL:      /* Current bpp in the guest */
             STAM_REL_COUNTER_INC(&pThis->svga.StatRegBitsPerPixelRd);
-            if (    pThis->svga.fEnabled
-                &&  pThis->svga.uBpp != VMSVGA_VAL_UNINITIALIZED)
-                *pu32 = (pThis->svga.uBpp + 7) & ~7;
-            else
-            {
-#ifndef IN_RING3
-                rc = VINF_IOM_R3_IOPORT_READ;
-#else
-                *pu32 = (pThisCC->pDrv->cBits + 7) & ~7;
-#endif
-            }
+            *pu32 = pThis->svga.uBpp;
             break;
 
@@ -1030,18 +1010,9 @@
             uint32_t uBpp;
 
-            if (    pThis->svga.fEnabled
-                &&  pThis->svga.uBpp != VMSVGA_VAL_UNINITIALIZED)
-            {
+            if (pThis->svga.fEnabled)
                 uBpp = pThis->svga.uBpp;
-            }
             else
-            {
-#ifndef IN_RING3
-                rc = VINF_IOM_R3_IOPORT_READ;
-                break;
-#else
-                uBpp = pThisCC->pDrv->cBits;
-#endif
-            }
+                uBpp = pThis->svga.uHostBpp;
+
             uint32_t u32RedMask, u32GreenMask, u32BlueMask;
             switch (uBpp)
@@ -1469,5 +1440,5 @@
         pThis->svga.uWidth  = VMSVGA_VAL_UNINITIALIZED;
         pThis->svga.uHeight = VMSVGA_VAL_UNINITIALIZED;
-        pThis->svga.uBpp    = VMSVGA_VAL_UNINITIALIZED;
+        pThis->svga.uBpp    = pThis->svga.uHostBpp;
     }
 
@@ -1702,6 +1673,5 @@
             {
                 if (    pThis->svga.uWidth  == VMSVGA_VAL_UNINITIALIZED
-                    &&  pThis->svga.uHeight == VMSVGA_VAL_UNINITIALIZED
-                    &&  pThis->svga.uBpp    == VMSVGA_VAL_UNINITIALIZED)
+                    &&  pThis->svga.uHeight == VMSVGA_VAL_UNINITIALIZED)
                 {
                     /* Keep the current mode. */
@@ -1712,6 +1682,5 @@
 
                 if (    pThis->svga.uWidth  != VMSVGA_VAL_UNINITIALIZED
-                    &&  pThis->svga.uHeight != VMSVGA_VAL_UNINITIALIZED
-                    &&  pThis->svga.uBpp    != VMSVGA_VAL_UNINITIALIZED)
+                    &&  pThis->svga.uHeight != VMSVGA_VAL_UNINITIALIZED)
                     ASMAtomicOrU32(&pThis->svga.u32ActionFlags, VMSVGA_ACTION_CHANGEMODE);
 # ifdef LOG_ENABLED
@@ -6309,5 +6278,5 @@
     pThis->svga.uWidth       = VMSVGA_VAL_UNINITIALIZED;
     pThis->svga.uHeight      = VMSVGA_VAL_UNINITIALIZED;
-    pThis->svga.uBpp         = VMSVGA_VAL_UNINITIALIZED;
+    pThis->svga.uBpp         = pThis->svga.uHostBpp;
     pThis->svga.cbScanline   = 0;
     pThis->svga.u32PitchLock = 0;
@@ -6429,8 +6398,18 @@
     pThis->svga.fVRAMTracking = true;
 
+    /* Set up the host bpp. This value is as a default for the programmable
+     * bpp value. On old implementations, SVGA_REG_HOST_BITS_PER_PIXEL did not
+     * exist and SVGA_REG_BITS_PER_PIXEL was read-only, returning what was later
+     * separated as SVGA_REG_HOST_BITS_PER_PIXEL.
+     *
+     * NB: The driver cBits value is currently constant for the lifetime of the
+     * VM. If that changes, the host bpp logic might need revisiting.
+     */
+    pThis->svga.uHostBpp = (pThisCC->pDrv->cBits + 7) & ~7;
+
     /* Invalidate current settings. */
     pThis->svga.uWidth     = VMSVGA_VAL_UNINITIALIZED;
     pThis->svga.uHeight    = VMSVGA_VAL_UNINITIALIZED;
-    pThis->svga.uBpp       = VMSVGA_VAL_UNINITIALIZED;
+    pThis->svga.uBpp       = pThis->svga.uHostBpp;
     pThis->svga.cbScanline = 0;
 
Index: trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h
===================================================================
--- trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h	(revision 83277)
+++ trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h	(revision 83278)
@@ -213,9 +213,10 @@
     /** True when the guest modifies the GFB mode registers. */
     bool                        fGFBRegisters;
-    bool                        afPadding[2];
+    bool                        afPadding[6];
     uint32_t                    uWidth;
     uint32_t                    uHeight;
     uint32_t                    uBpp;
     uint32_t                    cbScanline;
+    uint32_t                    uHostBpp;
     /** Maximum width supported. */
     uint32_t                    u32MaxWidth;
