VirtualBox

Changeset 1924 in vbox for trunk/src/recompiler/new


Ignore:
Timestamp:
Apr 4, 2007 11:47:11 AM (18 years ago)
Author:
vboxsync
Message:

Correct CPL when trying to load a ring 1 selector

File:
1 edited

Legend:

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

    r1911 r1924  
    20502050    selector &= 0xffff;
    20512051    cpl = env->hflags & HF_CPL_MASK;
     2052
     2053#ifdef VBOX
     2054    /* Trying to load a selector with CPL=1? */
     2055    if (cpl == 0 && (selector & 3) == 1 && (env->state & CPU_RAW_RING0))
     2056    {
     2057        Log(("RPL 1 -> sel %04X -> %04X\n", selector, selector & 0xfffc));
     2058        selector = selector & 0xfffc;
     2059    }
     2060#endif
     2061
    20522062    if ((selector & 0xfffc) == 0) {
    20532063        /* null selector case */
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