Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 56557)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 56558)
@@ -3928,8 +3928,7 @@
  *          (centaur) CPU.
  *
- * @param   pSession        The session handle.
  * @param   pfCaps          Where to store the capabilities.
  */
-SUPR0DECL(int) SUPR0QueryVTCaps(PSUPDRVSESSION pSession, uint32_t *pfCaps)
+int VBOXCALL supdrvQueryVTCapsInternal(uint32_t *pfCaps)
 {
     int  rc = VERR_UNSUPPORTED_CPU;
@@ -3940,5 +3939,4 @@
      * Input validation.
      */
-    AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER);
     AssertPtrReturn(pfCaps, VERR_INVALID_POINTER);
 
@@ -4021,4 +4019,34 @@
         SUPR0Printf(("WARNING! CR4 hints SMX mode but your CPU is too secretive. Proceeding anyway... We wish you good luck!\n"));
     return rc;
+}
+
+/**
+ * Queries the AMD-V and VT-x capabilities of the calling CPU.
+ *
+ * @returns VBox status code.
+ * @retval  VERR_VMX_NO_VMX
+ * @retval  VERR_VMX_MSR_ALL_VMXON_DISABLED
+ * @retval  VERR_VMX_MSR_VMXON_DISABLED
+ * @retval  VERR_VMX_MSR_LOCKING_FAILED
+ * @retval  VERR_SVM_NO_SVM
+ * @retval  VERR_SVM_DISABLED
+ * @retval  VERR_UNSUPPORTED_CPU if not identifiable as an AMD, Intel or VIA
+ *          (centaur) CPU.
+ *
+ * @param   pSession        The session handle.
+ * @param   pfCaps          Where to store the capabilities.
+ */
+SUPR0DECL(int) SUPR0QueryVTCaps(PSUPDRVSESSION pSession, uint32_t *pfCaps)
+{
+    /*
+     * Input validation.
+     */
+    AssertReturn(SUP_IS_SESSION_VALID(pSession), VERR_INVALID_PARAMETER);
+    AssertPtrReturn(pfCaps, VERR_INVALID_POINTER);
+
+    /*
+     * Call common worker.
+     */
+    return supdrvQueryVTCapsInternal(pfCaps);
 }
 
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 56557)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 56558)
@@ -942,4 +942,5 @@
 uint32_t VBOXCALL supdrvSessionRetain(PSUPDRVSESSION pSession);
 uint32_t VBOXCALL supdrvSessionRelease(PSUPDRVSESSION pSession);
+int VBOXCALL    supdrvQueryVTCapsInternal(uint32_t *pfCaps);
 
 /* SUPDrvGip.cpp */
Index: /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp	(revision 56557)
+++ /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp	(revision 56558)
@@ -902,4 +902,26 @@
 
 
+#ifdef VBOX_WITH_HOST_VMX
+/**
+ * For cleaning up the mess we left behind on Yosemite with 4.3.28 and earlier.
+ *
+ * We ASSUME VT-x is supported by the CPU.
+ *
+ * @param   idCpu       Unused.
+ * @param   pvUser1     Unused.
+ * @param   pvUser2     Unused.
+ */
+static DECLCALLBACK(void) vboxdrvDarwinVmxEnableFix(RTCPUID idCpu, void *pvUser1, void *pvUser2)
+{
+    RTCCUINTREG uCr4 = ASMGetCR4();
+    if (!(uCr4 & X86_CR4_VMXE))
+    {
+        uCr4 |= X86_CR4_VMXE;
+        ASMSetCR4(uCr4);
+    }
+}
+#endif
+
+
 /**
  * @copydoc SUPR0EnableVTx
@@ -919,4 +941,33 @@
         if (fEnable)
         {
+            /*
+             * We screwed up on Yosemite and didn't notice that we weren't
+             * calling host_vmxon.  CR4.VMXE may therefor have been disabled
+             * by us.  So, first time around we make sure it's set so we won't
+             * crash in the pre-4.3.28/5.0RC1 upgrade scenario.
+             */
+            static bool volatile g_fDoneCleanup = false;
+            if (!g_fDoneCleanup)
+            {
+                if (version_major == 14 /* 14 = 10.10 = yosemite */)
+                {
+                    uint32_t fCaps;
+                    int rc = supdrvQueryVTCapsInternal(&fCaps);
+                    if (RT_SUCCESS(rc))
+                    {
+                        if (fCaps & SUPVTCAPS_VT_X)
+                            rc = RTMpOnAll(vboxdrvDarwinVmxEnableFix, NULL, NULL);
+                        else
+                            rc = VERR_VMX_NO_VMX;
+                    }
+                    if (RT_FAILURE(rc))
+                        return rc;
+                }
+                g_fDoneCleanup = true;
+            }
+
+            /*
+             * Call the kernel.
+             */
             rc = host_vmxon(false /* exclusive */);
             if (rc == VMX_OK)
