VirtualBox

Changeset 61630 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 9, 2016 5:56:23 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
107978
Message:

IEM: When dispatching interrupts, set new CPL before pushing stuff on the stack.

File:
1 edited

Legend:

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

    r61450 r61630  
    35353535         */
    35363536
     3537        /* Set the new CPL so that stack accesses use it. */
     3538        pIemCpu->uCpl = uNewCpl;
     3539
    35373540        /* Create the stack frame. */
    35383541        RTPTRUNION uStackFrame;
     
    35473550                *uStackFrame.pu32++ = uErr;
    35483551            uStackFrame.pu32[0] = (fFlags & IEM_XCPT_FLAGS_T_SOFT_INT) ? pCtx->eip + cbInstr : pCtx->eip;
    3549             uStackFrame.pu32[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | pIemCpu->uCpl;
     3552            uStackFrame.pu32[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | (pCtx->ss.Sel & X86_SEL_RPL);
    35503553            uStackFrame.pu32[2] = fEfl;
    35513554            uStackFrame.pu32[3] = pCtx->esp;
     
    35653568                *uStackFrame.pu16++ = uErr;
    35663569            uStackFrame.pu16[0] = (fFlags & IEM_XCPT_FLAGS_T_SOFT_INT) ? pCtx->ip + cbInstr : pCtx->ip;
    3567             uStackFrame.pu16[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | pIemCpu->uCpl;
     3570            uStackFrame.pu16[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | (pCtx->ss.Sel & X86_SEL_RPL);
    35683571            uStackFrame.pu16[2] = fEfl;
    35693572            uStackFrame.pu16[3] = pCtx->sp;
Note: See TracChangeset for help on using the changeset viewer.

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