Index: /trunk/src/VBox/VMM/HWACCM.cpp
===================================================================
--- /trunk/src/VBox/VMM/HWACCM.cpp	(revision 25930)
+++ /trunk/src/VBox/VMM/HWACCM.cpp	(revision 25931)
@@ -46,4 +46,5 @@
 #include <iprt/asm.h>
 #include <iprt/string.h>
+#include <iprt/env.h>
 #include <iprt/thread.h>
 
@@ -653,4 +654,17 @@
     int rc;
 
+    /* Hack to allow users to work around broken BIOSes that incorrectly set EFER.SVME, which makes us believe somebody else
+     * is already using AMD-V. 
+     */
+    if (    !pVM->hwaccm.s.vmx.fSupported
+        &&  !pVM->hwaccm.s.svm.fSupported
+        &&  pVM->hwaccm.s.lLastError == VERR_SVM_IN_USE /* implies functional AMD-V */
+        &&  RTEnvGet("VBOX_HWVIRTEX_IGNORE_SVM_IN_USE"))
+    {
+        LogRel(("HWACCM: VBOX_HWVIRTEX_IGNORE_SVM_IN_USE active!\n"));
+        pVM->hwaccm.s.svm.fSupported        = true;
+        pVM->hwaccm.s.svm.fIgnoreInUseError = true;
+    }
+    else
     if (    !pVM->hwaccm.s.vmx.fSupported
         &&  !pVM->hwaccm.s.svm.fSupported)
@@ -658,4 +672,5 @@
         LogRel(("HWACCM: No VT-x or AMD-V CPU extension found. Reason %Rrc\n", pVM->hwaccm.s.lLastError));
         LogRel(("HWACCM: VMX MSR_IA32_FEATURE_CONTROL=%RX64\n", pVM->hwaccm.s.vmx.msr.feature_ctrl));
+
         if (VMMIsHwVirtExtForced(pVM))
         {
Index: /trunk/src/VBox/VMM/HWACCMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/HWACCMInternal.h	(revision 25930)
+++ /trunk/src/VBox/VMM/HWACCMInternal.h	(revision 25931)
@@ -173,4 +173,7 @@
     /** Configured for VT-x or AMD-V. */
     bool                fConfigured;
+
+    /** Set if the VBOX_HWVIRTEX_IGNORE_SVM_IN_USE hack is active. */
+    bool                fIgnoreAMDVInUseError;
 
     /** In use by our code. (for power suspend) */
@@ -413,5 +416,6 @@
         /** Set if erratum 170 affects the AMD cpu. */
         bool                        fAlwaysFlushTLB;
-        bool                        u8Alignment;
+        /** Set when the hack to ignore VERR_SVM_IN_USE is active. */
+        bool                        fIgnoreInUseError;
 
         /** R0 memory object for the IO bitmap (12kb). */
Index: /trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp	(revision 25930)
+++ /trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp	(revision 25931)
@@ -149,5 +149,6 @@
 VMMR0DECL(int) HWACCMR0Init(void)
 {
-    int        rc;
+    int     rc;
+    bool    fAMDVPresent = false;
 
     memset(&HWACCMR0Globals, 0, sizeof(HWACCMR0Globals));
@@ -354,4 +355,9 @@
                 RTCPUID idCpu = 0;
 
+                fAMDVPresent = true;
+
+                /* Query AMD features. */
+                ASMCpuId(0x8000000A, &HWACCMR0Globals.svm.u32Rev, &HWACCMR0Globals.uMaxASID, &u32Dummy, &HWACCMR0Globals.svm.u32Features);
+
                 /* We need to check if AMD-V has been properly initialized on all CPUs. Some BIOSes might do a poor job. */
                 memset(aRc, 0, sizeof(aRc));
@@ -368,6 +374,4 @@
                 if (RT_SUCCESS(rc))
                 {
-                    /* Query AMD features. */
-                    ASMCpuId(0x8000000A, &HWACCMR0Globals.svm.u32Rev, &HWACCMR0Globals.uMaxASID, &u32Dummy, &HWACCMR0Globals.svm.u32Features);
                     /* Read the HWCR msr for diagnostics. */
                     HWACCMR0Globals.svm.msrHWCR    = ASMRdMsr(MSR_K8_HWCR);
@@ -400,5 +404,5 @@
     }
     else
-    if (HWACCMR0Globals.svm.fSupported)
+    if (fAMDVPresent)
     {
         HWACCMR0Globals.pfnEnterSession     = SVMR0Enter;
Index: /trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp	(revision 25930)
+++ /trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp	(revision 25931)
@@ -78,5 +78,15 @@
     uint64_t val = ASMRdMsr(MSR_K6_EFER);
     if (val & MSR_K6_EFER_SVME)
-        return VERR_SVM_IN_USE;
+    {
+        /* If the VBOX_HWVIRTEX_IGNORE_SVM_IN_USE hack is active, then we blindly use AMD-V. */
+        if (    pVM
+            &&  pVM->hwaccm.s.svm.fIgnoreInUseError)
+        {
+            pCpu->fIgnoreAMDVInUseError = true;
+        }
+
+        if (!pCpu->fIgnoreAMDVInUseError)
+            return VERR_SVM_IN_USE;
+    }
 
     /* Turn on AMD-V in the EFER MSR. */
