Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 101476)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 101477)
@@ -758,5 +758,5 @@
                                    const ComPtr<IGraphicsAdapter> &ptrGraphicsAdapter,
                                    const ComPtr<IFirmwareSettings> &ptrFirmwareSettings,
-                                   bool fHMEnabled);
+                                   bool fForceVmSvga3 = false, bool fExposeLegacyVga = true);
     int i_checkMediumLocation(IMedium *pMedium, bool *pfUseHostIOCache);
     int i_unmountMediumFromGuest(PUVM pUVM, PCVMMR3VTABLE pVMM, StorageBus_T enmBus, DeviceType_T enmDevType,
Index: /trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp	(revision 101476)
+++ /trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp	(revision 101477)
@@ -605,26 +605,13 @@
         vrc = RTFdtNodeFinalize(hFdt);                                                      VRC();
 
+        /*
+         * VMSVGA compliant graphics controller.
+         */
         if (   enmGraphicsController != GraphicsControllerType_QemuRamFB
             && enmGraphicsController != GraphicsControllerType_Null)
         {
-            InsertConfigNode(pDevices, "vga", &pDev);
-            InsertConfigNode(pDev,     "0", &pInst);
-            InsertConfigInteger(pInst, "Trusted",           1);
-            hrc = pBusMgr->assignPCIDevice("vga", pInst);                                   H();
-            InsertConfigNode(pInst,    "Config", &pCfg);
-            InsertConfigInteger(pCfg,  "VRamSize",          32 * _1M);
-            InsertConfigInteger(pCfg,  "MonitorCount",         1);
-            i_attachStatusDriver(pInst, DeviceType_Graphics3D);
-            InsertConfigInteger(pCfg, "VMSVGAEnabled", true);
-            InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true);
-            InsertConfigInteger(pCfg, "VMSVGAPciId", true);
-            InsertConfigInteger(pCfg, "VMSVGA3dEnabled", false);
-            InsertConfigInteger(pCfg, "VmSvga3", true);
-            InsertConfigInteger(pCfg, "VmSvgaExposeLegacyVga", false);
-
-            /* Attach the display. */
-            InsertConfigNode(pInst,    "LUN#0", &pLunL0);
-            InsertConfigString(pLunL0, "Driver",               "MainDisplay");
-            InsertConfigNode(pLunL0,   "Config", &pCfg);
+            vrc = i_configGraphicsController(pDevices, enmGraphicsController, pBusMgr, pMachine,
+                                             pGraphicsAdapter, firmwareSettings,
+                                             true /*fForceVmSvga3*/, false /*fExposeLegacyVga*/);   VRC();
         }
 
Index: /trunk/src/VBox/Main/src-client/ConsoleImplConfigCommon.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImplConfigCommon.cpp	(revision 101476)
+++ /trunk/src/VBox/Main/src-client/ConsoleImplConfigCommon.cpp	(revision 101477)
@@ -5026,4 +5026,137 @@
 
 
+int Console::i_configGraphicsController(PCFGMNODE pDevices,
+                                        const GraphicsControllerType_T enmGraphicsController,
+                                        BusAssignmentManager *pBusMgr,
+                                        const ComPtr<IMachine> &ptrMachine,
+                                        const ComPtr<IGraphicsAdapter> &ptrGraphicsAdapter,
+                                        const ComPtr<IFirmwareSettings> &ptrFirmwareSettings,
+                                        bool fForceVmSvga3, bool fExposeLegacyVga)
+{
+    // InsertConfig* throws
+    try
+    {
+        PCFGMNODE pDev, pInst, pCfg, pLunL0;
+        HRESULT hrc;
+        Bstr    bstr;
+        const char *pcszDevice = "vga";
+
+        InsertConfigNode(pDevices, pcszDevice, &pDev);
+        InsertConfigNode(pDev,     "0", &pInst);
+        InsertConfigInteger(pInst, "Trusted",              1); /* boolean */
+
+        hrc = pBusMgr->assignPCIDevice(pcszDevice, pInst);                                  H();
+        InsertConfigNode(pInst,    "Config", &pCfg);
+        ULONG cVRamMBs;
+        hrc = ptrGraphicsAdapter->COMGETTER(VRAMSize)(&cVRamMBs);                           H();
+        InsertConfigInteger(pCfg,  "VRamSize",             cVRamMBs * _1M);
+        ULONG cMonitorCount;
+        hrc = ptrGraphicsAdapter->COMGETTER(MonitorCount)(&cMonitorCount);                  H();
+        InsertConfigInteger(pCfg,  "MonitorCount",         cMonitorCount);
+
+        BOOL f3DEnabled;
+        hrc = ptrGraphicsAdapter->COMGETTER(Accelerate3DEnabled)(&f3DEnabled);              H();
+        InsertConfigInteger(pCfg,  "3DEnabled",            f3DEnabled);
+
+        i_attachStatusDriver(pInst, DeviceType_Graphics3D);
+
+#ifdef VBOX_WITH_VMSVGA
+        if (   enmGraphicsController == GraphicsControllerType_VMSVGA
+            || enmGraphicsController == GraphicsControllerType_VBoxSVGA)
+        {
+            InsertConfigInteger(pCfg, "VMSVGAEnabled", true);
+            if (enmGraphicsController == GraphicsControllerType_VMSVGA)
+            {
+                InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true);
+                InsertConfigInteger(pCfg, "VMSVGAPciId", true);
+            }
+# ifdef VBOX_WITH_VMSVGA3D
+            InsertConfigInteger(pCfg, "VMSVGA3dEnabled", f3DEnabled);
+# else
+            LogRel(("VMSVGA3d not available in this build!\n"));
+# endif /* VBOX_WITH_VMSVGA3D */
+
+            InsertConfigInteger(pCfg, "VmSvga3", fForceVmSvga3);
+            InsertConfigInteger(pCfg, "VmSvgaExposeLegacyVga", fExposeLegacyVga);
+        }
+#else
+        RT_NOREF(enmGraphicsController);
+#endif /* VBOX_WITH_VMSVGA */
+
+        /* Custom VESA mode list */
+        unsigned cModes = 0;
+        for (unsigned iMode = 1; iMode <= 16; ++iMode)
+        {
+            char szExtraDataKey[sizeof("CustomVideoModeXX")];
+            RTStrPrintf(szExtraDataKey, sizeof(szExtraDataKey), "CustomVideoMode%u", iMode);
+            hrc = ptrMachine->GetExtraData(Bstr(szExtraDataKey).raw(), bstr.asOutParam());  H();
+            if (bstr.isEmpty())
+                break;
+            InsertConfigString(pCfg, szExtraDataKey, bstr);
+            ++cModes;
+        }
+        InsertConfigInteger(pCfg, "CustomVideoModes", cModes);
+
+        /* VESA height reduction */
+        ULONG ulHeightReduction;
+        IFramebuffer *pFramebuffer = NULL;
+        hrc = i_getDisplay()->QueryFramebuffer(0, &pFramebuffer);
+        if (SUCCEEDED(hrc) && pFramebuffer)
+        {
+            hrc = pFramebuffer->COMGETTER(HeightReduction)(&ulHeightReduction);             H();
+            pFramebuffer->Release();
+            pFramebuffer = NULL;
+        }
+        else
+        {
+            /* If framebuffer is not available, there is no height reduction. */
+            ulHeightReduction = 0;
+        }
+        InsertConfigInteger(pCfg,  "HeightReduction", ulHeightReduction);
+
+        /*
+         * BIOS logo
+         */
+        BOOL fFadeIn;
+        hrc = ptrFirmwareSettings->COMGETTER(LogoFadeIn)(&fFadeIn);                             H();
+        InsertConfigInteger(pCfg,  "FadeIn",  fFadeIn ? 1 : 0);
+        BOOL fFadeOut;
+        hrc = ptrFirmwareSettings->COMGETTER(LogoFadeOut)(&fFadeOut);                           H();
+        InsertConfigInteger(pCfg,  "FadeOut", fFadeOut ? 1: 0);
+        ULONG logoDisplayTime;
+        hrc = ptrFirmwareSettings->COMGETTER(LogoDisplayTime)(&logoDisplayTime);                H();
+        InsertConfigInteger(pCfg,  "LogoTime", logoDisplayTime);
+        Bstr bstrLogoImagePath;
+        hrc = ptrFirmwareSettings->COMGETTER(LogoImagePath)(bstrLogoImagePath.asOutParam());    H();
+        InsertConfigString(pCfg,   "LogoFile", bstrLogoImagePath);
+
+        /*
+         * Boot menu
+         */
+        FirmwareBootMenuMode_T enmBootMenuMode;
+        int iShowBootMenu;
+        hrc = ptrFirmwareSettings->COMGETTER(BootMenuMode)(&enmBootMenuMode);                     H();
+        switch (enmBootMenuMode)
+        {
+            case FirmwareBootMenuMode_Disabled: iShowBootMenu = 0;  break;
+            case FirmwareBootMenuMode_MenuOnly: iShowBootMenu = 1;  break;
+            default:                        iShowBootMenu = 2;  break;
+        }
+        InsertConfigInteger(pCfg, "ShowBootMenu", iShowBootMenu);
+
+        /* Attach the display. */
+        InsertConfigNode(pInst,    "LUN#0", &pLunL0);
+        InsertConfigString(pLunL0, "Driver",               "MainDisplay");
+        InsertConfigNode(pLunL0,   "Config", &pCfg);
+    }
+    catch (ConfigError &x)
+    {
+        // InsertConfig threw something:
+        return x.m_vrc;
+    }
+
+    return VINF_SUCCESS;
+}
+
 #undef H
 #undef VRC
Index: /trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp	(revision 101476)
+++ /trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp	(revision 101477)
@@ -1419,6 +1419,5 @@
 #endif
             case GraphicsControllerType_VBoxVGA:
-                vrc = i_configGraphicsController(pDevices, enmGraphicsController, pBusMgr, pMachine, pGraphicsAdapter, firmwareSettings,
-                                                 RT_BOOL(fHMEnabled));
+                vrc = i_configGraphicsController(pDevices, enmGraphicsController, pBusMgr, pMachine, pGraphicsAdapter, firmwareSettings);
                 if (FAILED(vrc))
                     return vrc;
@@ -2070,140 +2069,2 @@
     return vrc;
 }
-
-
-int Console::i_configGraphicsController(PCFGMNODE pDevices,
-                                        const GraphicsControllerType_T enmGraphicsController,
-                                        BusAssignmentManager *pBusMgr,
-                                        const ComPtr<IMachine> &ptrMachine,
-                                        const ComPtr<IGraphicsAdapter> &ptrGraphicsAdapter,
-                                        const ComPtr<IFirmwareSettings> &ptrFirmwareSettings,
-                                        bool fHMEnabled)
-{
-    // InsertConfig* throws
-    try
-    {
-        PCFGMNODE pDev, pInst, pCfg, pLunL0;
-        HRESULT hrc;
-        Bstr    bstr;
-        const char *pcszDevice = "vga";
-
-#define H()         AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)
-        InsertConfigNode(pDevices, pcszDevice, &pDev);
-        InsertConfigNode(pDev,     "0", &pInst);
-        InsertConfigInteger(pInst, "Trusted",              1); /* boolean */
-
-        hrc = pBusMgr->assignPCIDevice(pcszDevice, pInst);                                  H();
-        InsertConfigNode(pInst,    "Config", &pCfg);
-        ULONG cVRamMBs;
-        hrc = ptrGraphicsAdapter->COMGETTER(VRAMSize)(&cVRamMBs);                           H();
-        InsertConfigInteger(pCfg,  "VRamSize",             cVRamMBs * _1M);
-        ULONG cMonitorCount;
-        hrc = ptrGraphicsAdapter->COMGETTER(MonitorCount)(&cMonitorCount);                  H();
-        InsertConfigInteger(pCfg,  "MonitorCount",         cMonitorCount);
-#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
-        InsertConfigInteger(pCfg,  "R0Enabled",            fHMEnabled);
-#else
-        NOREF(fHMEnabled);
-#endif
-        BOOL f3DEnabled;
-        hrc = ptrGraphicsAdapter->COMGETTER(Accelerate3DEnabled)(&f3DEnabled);              H();
-        InsertConfigInteger(pCfg,  "3DEnabled",            f3DEnabled);
-
-        i_attachStatusDriver(pInst, DeviceType_Graphics3D);
-
-#ifdef VBOX_WITH_VMSVGA
-        if (   enmGraphicsController == GraphicsControllerType_VMSVGA
-            || enmGraphicsController == GraphicsControllerType_VBoxSVGA)
-        {
-            InsertConfigInteger(pCfg, "VMSVGAEnabled", true);
-            if (enmGraphicsController == GraphicsControllerType_VMSVGA)
-            {
-                InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true);
-                InsertConfigInteger(pCfg, "VMSVGAPciId", true);
-            }
-# ifdef VBOX_WITH_VMSVGA3D
-            InsertConfigInteger(pCfg, "VMSVGA3dEnabled", f3DEnabled);
-# else
-            LogRel(("VMSVGA3d not available in this build!\n"));
-# endif /* VBOX_WITH_VMSVGA3D */
-        }
-#else
-        RT_NOREF(enmGraphicsController);
-#endif /* VBOX_WITH_VMSVGA */
-
-        /* Custom VESA mode list */
-        unsigned cModes = 0;
-        for (unsigned iMode = 1; iMode <= 16; ++iMode)
-        {
-            char szExtraDataKey[sizeof("CustomVideoModeXX")];
-            RTStrPrintf(szExtraDataKey, sizeof(szExtraDataKey), "CustomVideoMode%u", iMode);
-            hrc = ptrMachine->GetExtraData(Bstr(szExtraDataKey).raw(), bstr.asOutParam());  H();
-            if (bstr.isEmpty())
-                break;
-            InsertConfigString(pCfg, szExtraDataKey, bstr);
-            ++cModes;
-        }
-        InsertConfigInteger(pCfg, "CustomVideoModes", cModes);
-
-        /* VESA height reduction */
-        ULONG ulHeightReduction;
-        IFramebuffer *pFramebuffer = NULL;
-        hrc = i_getDisplay()->QueryFramebuffer(0, &pFramebuffer);
-        if (SUCCEEDED(hrc) && pFramebuffer)
-        {
-            hrc = pFramebuffer->COMGETTER(HeightReduction)(&ulHeightReduction);             H();
-            pFramebuffer->Release();
-            pFramebuffer = NULL;
-        }
-        else
-        {
-            /* If framebuffer is not available, there is no height reduction. */
-            ulHeightReduction = 0;
-        }
-        InsertConfigInteger(pCfg,  "HeightReduction", ulHeightReduction);
-
-        /*
-         * BIOS logo
-         */
-        BOOL fFadeIn;
-        hrc = ptrFirmwareSettings->COMGETTER(LogoFadeIn)(&fFadeIn);                             H();
-        InsertConfigInteger(pCfg,  "FadeIn",  fFadeIn ? 1 : 0);
-        BOOL fFadeOut;
-        hrc = ptrFirmwareSettings->COMGETTER(LogoFadeOut)(&fFadeOut);                           H();
-        InsertConfigInteger(pCfg,  "FadeOut", fFadeOut ? 1: 0);
-        ULONG logoDisplayTime;
-        hrc = ptrFirmwareSettings->COMGETTER(LogoDisplayTime)(&logoDisplayTime);                H();
-        InsertConfigInteger(pCfg,  "LogoTime", logoDisplayTime);
-        Bstr bstrLogoImagePath;
-        hrc = ptrFirmwareSettings->COMGETTER(LogoImagePath)(bstrLogoImagePath.asOutParam());    H();
-        InsertConfigString(pCfg,   "LogoFile", bstrLogoImagePath);
-
-        /*
-         * Boot menu
-         */
-        FirmwareBootMenuMode_T enmBootMenuMode;
-        int iShowBootMenu;
-        hrc = ptrFirmwareSettings->COMGETTER(BootMenuMode)(&enmBootMenuMode);                     H();
-        switch (enmBootMenuMode)
-        {
-            case FirmwareBootMenuMode_Disabled: iShowBootMenu = 0;  break;
-            case FirmwareBootMenuMode_MenuOnly: iShowBootMenu = 1;  break;
-            default:                        iShowBootMenu = 2;  break;
-        }
-        InsertConfigInteger(pCfg, "ShowBootMenu", iShowBootMenu);
-
-        /* Attach the display. */
-        InsertConfigNode(pInst,    "LUN#0", &pLunL0);
-        InsertConfigString(pLunL0, "Driver",               "MainDisplay");
-        InsertConfigNode(pLunL0,   "Config", &pCfg);
-    }
-    catch (ConfigError &x)
-    {
-        // InsertConfig threw something:
-        return x.m_vrc;
-    }
-
-#undef H
-
-    return VINF_SUCCESS;
-}
