VirtualBox

Changeset 31512 in vbox for trunk


Ignore:
Timestamp:
Aug 10, 2010 9:06:28 AM (14 years ago)
Author:
vboxsync
Message:

CPUMGetGuestCPL: Don't trust ssHid.Attr.n.u2Dpl to hold the CPL when we're in V8086 mode (REM).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r31489 r31512  
    23122312         */
    23132313        if (RT_LIKELY(pVCpu->cpum.s.Guest.cr0 & X86_CR0_PE))
    2314             cpl = pCtxCore->ssHid.Attr.n.u2Dpl;
     2314        {
     2315            if (!pCtxCore->eflags.Bits.u1VM)
     2316                cpl = pCtxCore->ssHid.Attr.n.u2Dpl;
     2317            else
     2318                cpl = 3; /* REM doesn't set DPL=3 in V8086 mode. See #5130. */
     2319        }
    23152320        else
    23162321            cpl = 0;  /* CPL set to 3 for VT-x real-mode emulation. */
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