Index: trunk/include/VBox/vmm/cpum.h
===================================================================
--- trunk/include/VBox/vmm/cpum.h	(revision 49474)
+++ trunk/include/VBox/vmm/cpum.h	(revision 49522)
@@ -289,13 +289,7 @@
 DECLINLINE(bool)    CPUMIsGuestInPAEModeEx(PCPUMCTX pCtx)
 {
-#ifdef VBOX_WITH_OLD_VTX_CODE
-    return (    (pCtx->cr4 & X86_CR4_PAE)
-            &&  CPUMIsGuestInPagedProtectedModeEx(pCtx)
-            &&  !CPUMIsGuestInLongModeEx(pCtx));
-#else
     return (   (pCtx->cr4 & X86_CR4_PAE)
             && CPUMIsGuestPagingEnabledEx(pCtx)
             && !(pCtx->msrEFER & MSR_K6_EFER_LME));
-#endif
 }
 
Index: trunk/include/VBox/vmm/hm_vmx.h
===================================================================
--- trunk/include/VBox/vmm/hm_vmx.h	(revision 49474)
+++ trunk/include/VBox/vmm/hm_vmx.h	(revision 49522)
@@ -378,5 +378,4 @@
  * @{
  */
-#ifndef VBOX_WITH_OLD_VTX_CODE
 # define VMX_VMCS_GUEST_ES_BASE_CACHE_IDX                       0
 # define VMX_VMCS_GUEST_CS_BASE_CACHE_IDX                       1
@@ -397,67 +396,4 @@
 # define VMX_VMCS_GUEST_CR3_CACHE_IDX                           15
 # define VMX_VMCS_MAX_NESTED_PAGING_CACHE_IDX                   (VMX_VMCS_GUEST_CR3_CACHE_IDX + 1)
-#else /* VBOX_WITH_OLD_VTX_CODE */
-# define VMX_VMCS_GUEST_RIP_CACHE_IDX                           0
-# define VMX_VMCS_GUEST_RSP_CACHE_IDX                           1
-# define VMX_VMCS_GUEST_RFLAGS_CACHE_IDX                        2
-# define VMX_VMCS32_GUEST_INTERRUPTIBILITY_STATE_CACHE_IDX      3
-# define VMX_VMCS_CTRL_CR0_READ_SHADOW_CACHE_IDX                4
-# define VMX_VMCS_GUEST_CR0_CACHE_IDX                           5
-# define VMX_VMCS_CTRL_CR4_READ_SHADOW_CACHE_IDX                6
-# define VMX_VMCS_GUEST_CR4_CACHE_IDX                           7
-# define VMX_VMCS_GUEST_DR7_CACHE_IDX                           8
-# define VMX_VMCS32_GUEST_SYSENTER_CS_CACHE_IDX                 9
-# define VMX_VMCS_GUEST_SYSENTER_EIP_CACHE_IDX                  10
-# define VMX_VMCS_GUEST_SYSENTER_ESP_CACHE_IDX                  11
-# define VMX_VMCS32_GUEST_GDTR_LIMIT_CACHE_IDX                  12
-# define VMX_VMCS_GUEST_GDTR_BASE_CACHE_IDX                     13
-# define VMX_VMCS32_GUEST_IDTR_LIMIT_CACHE_IDX                  14
-# define VMX_VMCS_GUEST_IDTR_BASE_CACHE_IDX                     15
-# define VMX_VMCS16_GUEST_FIELD_CS_CACHE_IDX                    16
-# define VMX_VMCS32_GUEST_CS_LIMIT_CACHE_IDX                    17
-# define VMX_VMCS_GUEST_CS_BASE_CACHE_IDX                       18
-# define VMX_VMCS32_GUEST_CS_ACCESS_RIGHTS_CACHE_IDX            19
-# define VMX_VMCS16_GUEST_FIELD_DS_CACHE_IDX                    20
-# define VMX_VMCS32_GUEST_DS_LIMIT_CACHE_IDX                    21
-# define VMX_VMCS_GUEST_DS_BASE_CACHE_IDX                       22
-# define VMX_VMCS32_GUEST_DS_ACCESS_RIGHTS_CACHE_IDX            23
-# define VMX_VMCS16_GUEST_FIELD_ES_CACHE_IDX                    24
-# define VMX_VMCS32_GUEST_ES_LIMIT_CACHE_IDX                    25
-# define VMX_VMCS_GUEST_ES_BASE_CACHE_IDX                       26
-# define VMX_VMCS32_GUEST_ES_ACCESS_RIGHTS_CACHE_IDX            27
-# define VMX_VMCS16_GUEST_FIELD_FS_CACHE_IDX                    28
-# define VMX_VMCS32_GUEST_FS_LIMIT_CACHE_IDX                    29
-# define VMX_VMCS_GUEST_FS_BASE_CACHE_IDX                       30
-# define VMX_VMCS32_GUEST_FS_ACCESS_RIGHTS_CACHE_IDX            31
-# define VMX_VMCS16_GUEST_FIELD_GS_CACHE_IDX                    32
-# define VMX_VMCS32_GUEST_GS_LIMIT_CACHE_IDX                    33
-# define VMX_VMCS_GUEST_GS_BASE_CACHE_IDX                       34
-# define VMX_VMCS32_GUEST_GS_ACCESS_RIGHTS_CACHE_IDX            35
-# define VMX_VMCS16_GUEST_FIELD_SS_CACHE_IDX                    36
-# define VMX_VMCS32_GUEST_SS_LIMIT_CACHE_IDX                    37
-# define VMX_VMCS_GUEST_SS_BASE_CACHE_IDX                       38
-# define VMX_VMCS32_GUEST_SS_ACCESS_RIGHTS_CACHE_IDX            39
-# define VMX_VMCS16_GUEST_FIELD_TR_CACHE_IDX                    40
-# define VMX_VMCS32_GUEST_TR_LIMIT_CACHE_IDX                    41
-# define VMX_VMCS_GUEST_TR_BASE_CACHE_IDX                       42
-# define VMX_VMCS32_GUEST_TR_ACCESS_RIGHTS_CACHE_IDX            43
-# define VMX_VMCS16_GUEST_FIELD_LDTR_CACHE_IDX                  44
-# define VMX_VMCS32_GUEST_LDTR_LIMIT_CACHE_IDX                  45
-# define VMX_VMCS_GUEST_LDTR_BASE_CACHE_IDX                     46
-# define VMX_VMCS32_GUEST_LDTR_ACCESS_RIGHTS_CACHE_IDX          47
-# define VMX_VMCS32_RO_EXIT_REASON_CACHE_IDX                    48
-# define VMX_VMCS32_RO_VM_INSTR_ERROR_CACHE_IDX                 49
-# define VMX_VMCS32_RO_EXIT_INSTR_LENGTH_CACHE_IDX              50
-# define VMX_VMCS32_RO_EXIT_INTERRUPTION_ERROR_CODE_CACHE_IDX   51
-# define VMX_VMCS32_RO_EXIT_INSTR_INFO_CACHE_IDX                52
-# define VMX_VMCS32_RO_EXIT_INTERRUPTION_INFO_CACHE_IDX         53
-# define VMX_VMCS_RO_EXIT_QUALIFICATION_CACHE_IDX               54
-# define VMX_VMCS32_RO_IDT_INFO_CACHE_IDX                       55
-# define VMX_VMCS32_RO_IDT_ERROR_CODE_CACHE_IDX                 56
-# define VMX_VMCS_MAX_CACHE_IDX                                 (VMX_VMCS32_RO_IDT_ERROR_CODE_CACHE_IDX + 1)
-# define VMX_VMCS_GUEST_CR3_CACHE_IDX                           57
-# define VMX_VMCS64_EXIT_GUEST_PHYS_ADDR_FULL_CACHE_IDX         58
-# define VMX_VMCS_MAX_NESTED_PAGING_CACHE_IDX                   (VMX_VMCS64_EXIT_GUEST_PHYS_ADDR_FULL_CACHE_IDX + 1)
-#endif  /* VBOX_WITH_OLD_VTX_CODE */
 /** @} */
 
@@ -1492,7 +1428,4 @@
 #define VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(a)         RT_BOOL((a) & VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID)
 #define VMX_EXIT_INTERRUPTION_INFO_NMI_UNBLOCK(a)                 ((a) & RT_BIT(12))
-#ifdef VBOX_WITH_OLD_VTX_CODE
-# define VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT                    31
-#endif
 #define VMX_EXIT_INTERRUPTION_INFO_VALID                          RT_BIT(31)
 #define VMX_EXIT_INTERRUPTION_INFO_IS_VALID(a)                    RT_BOOL((a) & RT_BIT(31))
@@ -2178,26 +2111,18 @@
 #endif
 
-#ifdef VBOX_WITH_OLD_VTX_CODE
-# if ARCH_BITS == 64
-#  define VMXWriteVmcs VMXWriteVmcs64
-# else
-#  define VMXWriteVmcs VMXWriteVmcs32
-# endif
-#else /* !VBOX_WITH_OLD_VTX_CODE */
-# ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
-#  define VMXWriteVmcsHstN(idxField, uVal)       HMVMX_IS_64BIT_HOST_MODE() ?                     \
+#ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
+# define VMXWriteVmcsHstN(idxField, uVal)       HMVMX_IS_64BIT_HOST_MODE() ?                     \
                                                    VMXWriteVmcs64(idxField, uVal)                 \
                                                  : VMXWriteVmcs32(idxField, uVal)
-#  define VMXWriteVmcsGstN(idxField, u64Val)     (pVCpu->CTX_SUFF(pVM)->hm.s.fAllow64BitGuests) ? \
+# define VMXWriteVmcsGstN(idxField, u64Val)     (pVCpu->CTX_SUFF(pVM)->hm.s.fAllow64BitGuests) ? \
                                                    VMXWriteVmcs64(idxField, u64Val)               \
                                                  : VMXWriteVmcs32(idxField, u64Val)
-# elif ARCH_BITS == 32
-#  define VMXWriteVmcsHstN                       VMXWriteVmcs32
-#  define VMXWriteVmcsGstN(idxField, u64Val)     VMXWriteVmcs64Ex(pVCpu, idxField, u64Val)
+#elif ARCH_BITS == 32
+# define VMXWriteVmcsHstN                       VMXWriteVmcs32
+# define VMXWriteVmcsGstN(idxField, u64Val)     VMXWriteVmcs64Ex(pVCpu, idxField, u64Val)
 # else  /* ARCH_BITS == 64 */
-#  define VMXWriteVmcsHstN                       VMXWriteVmcs64
-#  define VMXWriteVmcsGstN                       VMXWriteVmcs64
+# define VMXWriteVmcsHstN                       VMXWriteVmcs64
+# define VMXWriteVmcsGstN                       VMXWriteVmcs64
 # endif
-#endif  /* !VBOX_WITH_OLD_VTX_CODE */
 
 
@@ -2345,12 +2270,4 @@
 #endif
 
-#ifdef VBOX_WITH_OLD_VTX_CODE
-# if ARCH_BITS == 64
-#  define VMXReadVmcsField VMXReadVmcs64
-# else
-#  define VMXReadVmcsField VMXReadVmcs32
-# endif
-#endif
-
 /**
  * Gets the last instruction error value from the current VMCS
