VirtualBox

Changeset 47549 in vbox for trunk/src/recompiler


Ignore:
Timestamp:
Aug 6, 2013 3:59:00 AM (11 years ago)
Author:
vboxsync
Message:

REM: Set more access bits on selectors, clear/set the unusable flag more.

Location:
trunk/src/recompiler/target-i386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/target-i386/cpu.h

    r47309 r47549  
    952952    if (flags & DESC_P_MASK)
    953953        flags |= DESC_A_MASK;           /* Make sure the A bit is set to avoid trouble. */
    954     if (selector < 4U && (env->hflags & HF_CS64_MASK))
     954    else if (selector < 4U)
    955955        flags |= DESC_INTEL_UNUSABLE;
    956956    else
  • trunk/src/recompiler/target-i386/op_helper.c

    r47328 r47549  
    960960    if (load_segment(&e1, &e2, selector) != 0)
    961961        raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
     962#ifdef VBOX /** @todo figure out when this is done one day... */
     963    if (!(e2 & DESC_A_MASK))
     964        e2 = set_segment_accessed(selector, e2);
     965#endif
    962966    if (!(e2 & DESC_S_MASK) || !(e2 & (DESC_CS_MASK)))
    963967        raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
     
    976980        if (load_segment(&ss_e1, &ss_e2, ss) != 0)
    977981            raise_exception_err(EXCP0A_TSS, ss & 0xfffc);
     982#ifdef VBOX /** @todo figure out when this is done one day... */
     983        if (!(ss_e2 & DESC_A_MASK))
     984            ss_e2 = set_segment_accessed(ss, ss_e2);
     985#endif
    978986        ss_dpl = (ss_e2 >> DESC_DPL_SHIFT) & 3;
    979987        if (ss_dpl != dpl)
     
    27682776            !(env->hflags & HF_LMA_MASK) && !(e2 & DESC_L_MASK))
    27692777            raise_exception_err(EXCP0D_GPF, new_cs & 0xfffc);
     2778#ifdef VBOX
     2779        if (!(e2 & DESC_A_MASK))
     2780            e2 = set_segment_accessed(new_cs, e2);
     2781#endif
    27702782        cpu_x86_load_seg_cache(env, R_CS, (new_cs & 0xfffc) | cpl,
    27712783                       get_seg_base(e1, e2), limit, e2);
     
    28932905        if (!(e2 & DESC_P_MASK))
    28942906            raise_exception_err(EXCP0B_NOSEG, new_cs & 0xfffc);
     2907#ifdef VBOX
     2908        if (!(e2 & DESC_A_MASK))
     2909            e2 = set_segment_accessed(new_cs, e2);
     2910#endif
    28952911
    28962912#ifdef TARGET_X86_64
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