Index: /trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp	(revision 40359)
+++ /trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp	(revision 40360)
@@ -1453,37 +1453,4 @@
                     pCtx->gsHid.Attr.n.u2Dpl  = 0;
                     pCtx->ssHid.Attr.n.u2Dpl  = 0;
-
-                    /* The limit must correspond to the 32 bits setting. */
-                    if (!pCtx->csHid.Attr.n.u1DefBig)
-                        pCtx->csHid.u32Limit &= 0xffff;
-                    if (!pCtx->dsHid.Attr.n.u1DefBig)
-                        pCtx->dsHid.u32Limit &= 0xffff;
-                    if (!pCtx->esHid.Attr.n.u1DefBig)
-                        pCtx->esHid.u32Limit &= 0xffff;
-                    if (!pCtx->fsHid.Attr.n.u1DefBig)
-                        pCtx->fsHid.u32Limit &= 0xffff;
-                    if (!pCtx->gsHid.Attr.n.u1DefBig)
-                        pCtx->gsHid.u32Limit &= 0xffff;
-                    if (!pCtx->ssHid.Attr.n.u1DefBig)
-                        pCtx->ssHid.u32Limit &= 0xffff;
-                }
-                else
-                /* Switching from protected mode to real mode. */
-                if (    pVCpu->hwaccm.s.vmx.enmLastSeenGuestMode >= PGMMODE_PROTECTED
-                    &&  enmGuestMode == PGMMODE_REAL)
-                {
-                    /* The limit must also be set to 0xffff. */
-                    pCtx->csHid.u32Limit = 0xffff;
-                    pCtx->dsHid.u32Limit = 0xffff;
-                    pCtx->esHid.u32Limit = 0xffff;
-                    pCtx->fsHid.u32Limit = 0xffff;
-                    pCtx->gsHid.u32Limit = 0xffff;
-                    pCtx->ssHid.u32Limit = 0xffff;
-
-                    Assert(pCtx->csHid.u64Base <= 0xfffff);
-                    Assert(pCtx->dsHid.u64Base <= 0xfffff);
-                    Assert(pCtx->esHid.u64Base <= 0xfffff);
-                    Assert(pCtx->fsHid.u64Base <= 0xfffff);
-                    Assert(pCtx->gsHid.u64Base <= 0xfffff);
                 }
                 pVCpu->hwaccm.s.vmx.enmLastSeenGuestMode = enmGuestMode;
Index: /trunk/src/VBox/VMM/VMMR3/HWACCM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/HWACCM.cpp	(revision 40359)
+++ /trunk/src/VBox/VMM/VMMR3/HWACCM.cpp	(revision 40360)
@@ -2281,4 +2281,10 @@
                 if (   (   pCtx->cs != (pCtx->csHid.u64Base >> 4)
                         && pCtx->csHid.u64Base != 0xffff0000 /* we can deal with the BIOS code as it's also mapped into the lower region. */)
+                    || (pCtx->csHid.u32Limit != 0xffff)
+                    || (pCtx->dsHid.u32Limit != 0xffff)
+                    || (pCtx->esHid.u32Limit != 0xffff)
+                    || (pCtx->ssHid.u32Limit != 0xffff)
+                    || (pCtx->fsHid.u32Limit != 0xffff)
+                    || (pCtx->gsHid.u32Limit != 0xffff)
                     || pCtx->ds != (pCtx->dsHid.u64Base >> 4)
                     || pCtx->es != (pCtx->esHid.u64Base >> 4)
Index: /trunk/src/recompiler/target-i386/translate.c
===================================================================
--- /trunk/src/recompiler/target-i386/translate.c	(revision 40359)
+++ /trunk/src/recompiler/target-i386/translate.c	(revision 40360)
@@ -2563,15 +2563,4 @@
     tcg_gen_st_tl(cpu_T[0], cpu_env,
                   offsetof(CPUX86State,segs[seg_reg].base));
-#ifdef VBOX
-    int flags = DESC_P_MASK | DESC_S_MASK | DESC_W_MASK;
-    if (seg_reg == R_CS)
-        flags |= DESC_CS_MASK;
-    gen_op_movl_T0_im(flags);
-    tcg_gen_st32_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,segs[seg_reg].flags));
-
-    /* Set the limit to 0xffff. */
-    gen_op_movl_T0_im(0xffff);
-    tcg_gen_st32_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,segs[seg_reg].limit));
-#endif
 }
 
