Index: /trunk/include/VBox/sup.h
===================================================================
--- /trunk/include/VBox/sup.h	(revision 22614)
+++ /trunk/include/VBox/sup.h	(revision 22615)
@@ -926,4 +926,13 @@
 SUPR3DECL(int) SUPR3HardenedLdrLoadAppPriv(const char *pszFilename, PRTLDRMOD phLdrMod);
 
+
+/**
+ * Check if the host kernel can run in VMX root mode. 
+ *    
+ * @returns VINF_SUCCESS if supported, error code indicating why if not. 
+ */
+SUPR3DECL(int) SUPR3QueryVTxSupported(void);
+
+
 /** @} */
 #endif /* IN_RING3 */
@@ -995,5 +1004,4 @@
 SUPR0DECL(SUPPAGINGMODE) SUPR0GetPagingMode(void);
 SUPR0DECL(int) SUPR0EnableVTx(bool fEnable);
-SUPR0DECL(int) SUPR0QueryVTxSupport(void);
 
 /** @name Absolute symbols
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 22614)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 22615)
@@ -352,5 +352,4 @@
     { "SUPR0GetPagingMode",                     (void *)UNWIND_WRAP(SUPR0GetPagingMode) },
     { "SUPR0EnableVTx",                         (void *)SUPR0EnableVTx },
-    { "SUPR0QueryVTxSupport",                   (void *)SUPR0QueryVTxSupport },
     { "RTMemAlloc",                             (void *)UNWIND_WRAP(RTMemAlloc) },
     { "RTMemAllocZ",                            (void *)UNWIND_WRAP(RTMemAllocZ) },
@@ -4795,19 +4794,4 @@
 
 /**
- * Check if the host kernel can run in VMX root mode.
- *
- * @returns VINF_SUCCESS if supported, error code indicating why if not.
- */
-SUPR0DECL(int) SUPR0QueryVTxSupport(void)
-{
-#ifdef RT_OS_LINUX
-    return supdrvOSQueryVTxSupport();
-#else
-    return VINF_SUCCESS;
-#endif
-}
-
-
-/**
  * Creates the GIP.
  *
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 22614)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 22615)
@@ -197,5 +197,5 @@
  *          - Nothing.
  */
-#define SUPDRV_IOC_VERSION                              0x000f0001
+#define SUPDRV_IOC_VERSION                              0x000f0000
 
 /** SUP_IOCTL_COOKIE. */
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 22614)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 22615)
@@ -632,5 +632,4 @@
 bool VBOXCALL   supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt);
 int  VBOXCALL   supdrvOSEnableVTx(bool fEnabled);
-int  VBOXCALL   supdrvOSQueryVTxSupport(void);
 
 /*******************************************************************************
Index: /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 22614)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 22615)
@@ -273,5 +273,5 @@
         CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION;
         const uint32_t MinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x000f0000
-                                  ?  0x000f0001
+                                  ?  0x000f0000
                                   :  SUPDRV_IOC_VERSION & 0xffff0000;
         CookieReq.u.In.u32MinVersion = MinVersion;
@@ -413,5 +413,4 @@
         { "SUPR0Printf",                            0xefef000b },
         { "SUPR0GetPagingMode",                     0xefef000c },
-        { "SUPR0QueryVTxSupport",                   0xefef000d },
         { "SUPR0EnableVTx",                         0xefef000e },
         { "RTMemAlloc",                             0xefef000f },
@@ -2057,2 +2056,11 @@
 }
 
+
+SUPR3DECL(int) SUPR3QueryVTxSupported(void)
+{
+#ifdef RT_OS_LINUX
+    return suplibOsQueryVTxSupported();
+#else
+    return VINF_SUCCESS;
+#endif
+}
Index: /trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h	(revision 22614)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h	(revision 22615)
@@ -251,4 +251,5 @@
 int     suplibOsPageAlloc(PSUPLIBDATA pThis, size_t cPages, void **ppvPages);
 int     suplibOsPageFree(PSUPLIBDATA pThis, void *pvPages, size_t cPages);
+int     suplibOsQueryVTxSupported(void);
 
 
Index: /trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c	(revision 22614)
+++ /trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c	(revision 22615)
@@ -1006,22 +1006,4 @@
 
 /**
- * Check if the host kernel supports VT-x or not.
- *
- * Older Linux kernels clear the VMXE bit in the CR4 register (function
- * tlb_flush_all()) leading to a host kernel panic.
- *
- * @returns VBox error code
- */
-int VBOXCALL supdrvOSQueryVTxSupport(void)
-{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
-    return VINF_SUCCESS;
-#else
-    return VERR_SUPDRV_KERNEL_TOO_OLD_FOR_VTX;
-#endif
-}
-
-
-/**
  * Converts a supdrv error code to an linux error code.
  *
Index: /trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp	(revision 22614)
+++ /trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp	(revision 22615)
@@ -56,4 +56,5 @@
 #include <VBox/types.h>
 #include <iprt/string.h>
+#include <iprt/system.h>
 #include <VBox/err.h>
 #include <VBox/param.h>
@@ -254,2 +255,39 @@
 #endif /* !IN_SUP_HARDENED_R3 */
 
+
+/** Check if the host kernel supports VT-x or not.
+ *
+ * Older Linux kernels clear the VMXE bit in the CR4 register (function
+ * tlb_flush_all()) leading to a host kernel panic.
+ */
+int suplibOsQueryVTxSupported(void)
+{
+    char szBuf[256];
+    int rc = RTSystemQueryOSInfo(RTSYSOSINFO_RELEASE, szBuf, sizeof(szBuf));
+
+    if (RT_SUCCESS(rc))
+    {
+        char *pszNext;
+        uint32_t uA, uB, uC;
+
+        rc = RTStrToUInt32Ex(szBuf, &pszNext, 10, &uA);
+        if (   RT_SUCCESS(rc)
+                && *pszNext == '.')
+        {
+            rc = RTStrToUInt32Ex(pszNext+1, &pszNext, 10, &uB);
+            if (   RT_SUCCESS(rc)
+                    && *pszNext == '.')
+            {
+                rc = RTStrToUInt32Ex(pszNext+1, &pszNext, 10, &uC);
+                if (RT_SUCCESS(rc))
+                {
+                    uint32_t uLinuxVersion = (uA << 16) + (uB << 8) + uC;
+                    if (uLinuxVersion >= (2 << 16) + (6 << 8) + 32)
+                        return VINF_SUCCESS;
+                }
+            }
+        }
+    }
+
+    return VERR_SUPDRV_KERNEL_TOO_OLD_FOR_VTX;
+}
Index: /trunk/src/VBox/Main/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/HostImpl.cpp	(revision 22614)
+++ /trunk/src/VBox/Main/HostImpl.cpp	(revision 22615)
@@ -135,4 +135,5 @@
 #include <VBox/err.h>
 #include <VBox/settings.h>
+#include <VBox/sup.h>
 
 #include <stdio.h>
@@ -236,36 +237,7 @@
                )
             {
-#ifdef RT_OS_LINUX
-                /* Linux: VT-x is not supported on Linux < 2.6.13 because older kernels
-                 * unconditionally disable the VMXE flag */
-                char szBuf[64];
-                int rc = RTSystemQueryOSInfo(RTSYSOSINFO_RELEASE, szBuf, sizeof(szBuf));
-
+                int rc = SUPR3QueryVTxSupported();
                 if (RT_SUCCESS(rc))
-                {
-                    char *pszNext;
-                    uint32_t uA, uB, uC;
-
-                    rc = RTStrToUInt32Ex(szBuf, &pszNext, 10, &uA);
-                    if (   RT_SUCCESS(rc)
-                        && *pszNext == '.')
-                    {
-                        rc = RTStrToUInt32Ex(pszNext+1, &pszNext, 10, &uB);
-                        if (   RT_SUCCESS(rc)
-                            && *pszNext == '.')
-                        {
-                            rc = RTStrToUInt32Ex(pszNext+1, &pszNext, 10, &uC);
-                            if (RT_SUCCESS(rc))
-                            {
-                                uint32_t uLinuxVersion = (uA << 16) + (uB << 8) + uC;
-                                if (uLinuxVersion >= (2 << 16) + (6 << 8) + 13)
-                                    fVTxAMDVSupported = true;
-                            }
-                        }
-                    }
-                }
-#else
-                fVTxAMDVSupported = true;
-#endif
+                    fVTxAMDVSupported = true;
             }
         }
Index: /trunk/src/VBox/VMM/HWACCM.cpp
===================================================================
--- /trunk/src/VBox/VMM/HWACCM.cpp	(revision 22614)
+++ /trunk/src/VBox/VMM/HWACCM.cpp	(revision 22615)
@@ -638,4 +638,18 @@
     }
 
+    if (pVM->hwaccm.s.vmx.fSupported)
+    {
+        rc = SUPR3QueryVTxSupported();
+        if (RT_FAILURE(rc))
+        {
+#ifdef RT_OS_LINUX
+            LogRel(("HWACCM: The host kernel does not support VT-x -- Linux 2.6.13 or newer required!\n"));
+#else
+            LogRel(("HWACCM: The host kernel does not support VT-x!\n"));
+#endif
+            return VINF_SUCCESS;
+        }
+    }
+
     if (!pVM->hwaccm.s.fAllowed)
         return VINF_SUCCESS;    /* nothing to do */
Index: /trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp	(revision 22614)
+++ /trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp	(revision 22615)
@@ -603,8 +603,4 @@
             int     aRc[RTCPUSET_MAX_CPUS];
             RTCPUID idCpu = 0;
-
-            rc = SUPR0QueryVTxSupport();
-            if (RT_FAILURE(rc))
-                return rc;
 
             memset(aRc, 0, sizeof(aRc));
