VirtualBox

Changeset 45485 in vbox for trunk/src/recompiler/target-i386


Ignore:
Timestamp:
Apr 11, 2013 2:46:04 PM (12 years ago)
Author:
vboxsync
Message:
  • *: Where possible, drop the #ifdef VBOX_WITH_RAW_RING1 when EMIsRawRing1Enabled is used.
  • SELM: Don't shadow TSS.esp1/ss1 unless ring-1 compression is enabled (also fixed a log statement there).
  • SELM: selmGuestToShadowDesc should not push ring-1 selectors into ring-2 unless EMIsRawRing1Enabled() holds true.
  • REM: Don't set CPU_INTERRUPT_EXTERNAL_EXIT in helper_ltr() for now.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/target-i386/op_helper.c

    r45276 r45485  
    232232#ifdef VBOX
    233233    /* Trying to load a selector with CPL=1? */
    234     /* @todo this is a hack to correct the incorrect checking order for pending interrupts in the patm iret replacement code (corrected in the ring-1 version) */
    235     /* @todo in theory the iret could fault and we'd still need this. */
     234    /** @todo this is a hack to correct the incorrect checking order for pending interrupts in the patm iret replacement code (corrected in the ring-1 version) */
     235    /** @todo in theory the iret could fault and we'd still need this. */
    236236    if ((env->hflags & HF_CPL_MASK) == 0 && (selector & 3) == 1 && (env->state & CPU_RAW_RING0) && !EMIsRawRing1Enabled(env->pVM))
    237237    {
     
    25612561         (RTGCPTR)env->eip, (RTSEL)env->tr.selector, (RTGCPTR)env->tr.base, (RTGCPTR)env->tr.limit,
    25622562         env->tr.flags, (RTSEL)(selector & 0xffff)));
     2563# if 0 /** @todo r=bird: This looks very fishy, need good reason to re-enable it. */
    25632564    ASMAtomicOrS32((int32_t volatile *)&env->interrupt_request,
    25642565                    CPU_INTERRUPT_EXTERNAL_EXIT);
     2566# endif
    25652567#endif
    25662568    selector &= 0xffff;
     
    31863188        if ((new_cs & 0x3) == 1 && (env->state & CPU_RAW_RING0))
    31873189        {
    3188 # ifdef VBOX_WITH_RAW_RING1
    31893190            if (   !EMIsRawRing1Enabled(env->pVM)
    31903191                ||  env->segs[R_CS].selector == (new_cs & 0xfffc))
     
    31983199                Log(("Genuine switch to ring-1 (iret)\n"));
    31993200            }
    3200 # else
    3201             Log(("RPL 1 -> new_cs %04X -> %04X\n", new_cs, new_cs & 0xfffc));
    3202             new_cs = new_cs & 0xfffc;
    3203 # endif
    3204         }
    3205 # ifdef VBOX_WITH_RAW_RING1
    3206         else
    3207         if ((new_cs & 0x3) == 2 && (env->state & CPU_RAW_RING0) && EMIsRawRing1Enabled(env->pVM))
     3201        }
     3202        else if ((new_cs & 0x3) == 2 && (env->state & CPU_RAW_RING0) && EMIsRawRing1Enabled(env->pVM))
    32083203        {
    32093204            Log(("RPL 2 -> new_cs %04X -> %04X\n", new_cs, (new_cs & 0xfffc) | 1));
    32103205            new_cs = (new_cs & 0xfffc) | 1;
    32113206        }
    3212 # endif
    32133207#endif
    32143208    } else {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette