Index: /trunk/include/VBox/vmm/cpum.h
===================================================================
--- /trunk/include/VBox/vmm/cpum.h	(revision 45290)
+++ /trunk/include/VBox/vmm/cpum.h	(revision 45291)
@@ -271,4 +271,15 @@
 
 /**
+ * Tests if the guest has paging enabled or not.
+ *
+ * @returns true if paging is enabled, otherwise false.
+ * @param   pCtx    Current CPU context
+ */
+DECLINLINE(bool)    CPUMIsGuestPagingEnabledEx(PCPUMCTX pCtx)
+{
+    return !!(pCtx->cr0 & X86_CR0_PG);
+}
+
+/**
  * Tests if the guest is running in PAE mode or not.
  *
@@ -278,19 +289,13 @@
 DECLINLINE(bool)    CPUMIsGuestInPAEModeEx(PCPUMCTX pCtx)
 {
+#ifdef VBOX_WITH_OLD_VTX_CODE
     return (    (pCtx->cr4 & X86_CR4_PAE)
             &&  CPUMIsGuestInPagedProtectedModeEx(pCtx)
             &&  !CPUMIsGuestInLongModeEx(pCtx));
-}
-
-
-/**
- * Tests if the guest has paging enabled or not.
- *
- * @returns true if paging is enabled, otherwise false.
- * @param   pCtx    Current CPU context
- */
-DECLINLINE(bool)    CPUMIsGuestPagingEnabledEx(PCPUMCTX pCtx)
-{
-    return !!(pCtx->cr0 & X86_CR0_PG);
+#else
+    return (   (pCtx->cr4 & X86_CR4_PAE)
+            && CPUMIsGuestPagingEnabledEx(pCtx)
+            && !(pCtx->msrEFER & MSR_K6_EFER_LME));
+#endif
 }
 
Index: /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp	(revision 45290)
+++ /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp	(revision 45291)
@@ -2412,7 +2412,13 @@
 VMMDECL(bool) CPUMIsGuestInPAEMode(PVMCPU pVCpu)
 {
+#ifdef VBOX_WITH_OLD_VTX_CODE
     return (pVCpu->cpum.s.Guest.cr4 & X86_CR4_PAE)
         && (pVCpu->cpum.s.Guest.cr0 & (X86_CR0_PE | X86_CR0_PG)) == (X86_CR0_PE | X86_CR0_PG)
         && !(pVCpu->cpum.s.Guest.msrEFER & MSR_K6_EFER_LMA);
+#else
+    return (pVCpu->cpum.s.Guest.cr4 & X86_CR4_PAE)
+        && (pVCpu->cpum.s.Guest.cr0 & X86_CR0_PG)
+        && !(pVCpu->cpum.s.Guest.msrEFER & MSR_K6_EFER_LME);
+#endif
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/HM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/HM.cpp	(revision 45290)
+++ /trunk/src/VBox/VMM/VMMR3/HM.cpp	(revision 45291)
@@ -2392,13 +2392,21 @@
 {
     /*
-     * The VMM device heap is a requirement for emulating real mode or protected mode without paging
+     * The VMM device heap is a requirement for emulating real-mode or protected-mode without paging
      * when the unrestricted guest execution feature is missing (VT-x only).
      */
-    if (    pVM->hm.s.vmx.fEnabled
-        &&  !pVM->hm.s.vmx.fUnrestrictedGuest
-        &&  !CPUMIsGuestInPagedProtectedModeEx(pCtx)
-        &&  !PDMVmmDevHeapIsEnabled(pVM)
-        &&  (pVM->hm.s.fNestedPaging || CPUMIsGuestInRealModeEx(pCtx)))
+#ifdef VBOX_WITH_OLD_VTX_CODE
+    if (   pVM->hm.s.vmx.fEnabled
+        && !pVM->hm.s.vmx.fUnrestrictedGuest
+        && !CPUMIsGuestInPagedProtectedModeEx(pCtx)
+        && !PDMVmmDevHeapIsEnabled(pVM)
+        && (pVM->hm.s.fNestedPaging || CPUMIsGuestInRealModeEx(pCtx)))
         return true;
+#else
+    if (   pVM->hm.s.vmx.fEnabled
+        && !pVM->hm.s.vmx.fUnrestrictedGuest
+        && CPUMIsGuestInRealModeEx(pCtx)
+        && !PDMVmmDevHeapIsEnabled(pVM))
+        return true;
+#endif
 
     return false;
Index: /trunk/src/VBox/VMM/include/HMInternal.mac
===================================================================
--- /trunk/src/VBox/VMM/include/HMInternal.mac	(revision 45290)
+++ /trunk/src/VBox/VMM/include/HMInternal.mac	(revision 45291)
@@ -15,5 +15,14 @@
 ;
 
+%ifdef VBOX_WITH_OLD_VTX_CODE
 %define VMX_USE_CACHED_VMCS_ACCESSES
+%else
+%if HC_ARCH_BITS == 32
+%ifndef VBOX_WITH_HYBRID_32BIT_KERNEL
+%define VMX_USE_CACHED_VMCS_ACCESSES
+%endif  ; VBOX_WITH_HYBRID_32BIT_KERNEL
+%endif   ; HC_ARCH_BITS == 32
+%endif    ; VBOX_WITH_OLD_VTX_CODE
+
 %define VBOX_WITH_AUTO_MSR_LOAD_RESTORE
 
