Index: /trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp	(revision 51647)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp	(revision 51648)
@@ -1821,4 +1821,17 @@
             if (u32Version > VGA_SAVEDSTATE_VERSION_WDDM)
             {
+#define VBOX_VHWA_SOLARIS_ARCH "solaris."
+
+                bool fLoadCommands;
+
+                if (u32Version < VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA)
+                {
+                    const char *pcszOsArch = SSMR3HandleHostOSAndArch(pSSM);
+                    Assert(pcszOsArch);
+                    fLoadCommands = !pcszOsArch || RTStrNCmp(pcszOsArch, VBOX_VHWA_SOLARIS_ARCH, sizeof (VBOX_VHWA_SOLARIS_ARCH) - 1);
+                }
+                else
+                    fLoadCommands = true;
+
 #ifdef VBOX_WITH_VIDEOHWACCEL
                 uint32_t cbCmd = sizeof (VBOXVHWACMD_HH_SAVESTATE_LOADPERFORM); /* maximum cmd size */
@@ -1835,22 +1848,4 @@
                     vbvaVHWAHHCommandRelease(pCmd);
                     AssertRCReturn(rc, rc);
-                    bool fLoadCommands = false;
-
-                    if (u32Version < VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA)
-                    {
-                        /* prev versions have a bug that does not allow to distinguish between the sate made with VHWA not available (on solaris box)
-                         * and VHWA disabled */
-
-                        for (uint32_t i = 0; i < pVGAState->cMonitors; ++i)
-                        {
-                            if (VhwaData.ab2DOn[i])
-                            {
-                                fLoadCommands = true;
-                                break;
-                            }
-                        }
-                    }
-                    else
-                        fLoadCommands = true;
 
                     if (fLoadCommands)
@@ -1879,5 +1874,5 @@
                 }
 
-                if (u32Version >= VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA)
+                if (fLoadCommands)
                 {
                     rc = SSMR3GetU32(pSSM, &u32);
