Changeset 61640 in vbox
- Timestamp:
- Jun 9, 2016 8:31:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r61635 r61640 3536 3536 3537 3537 /* Set the new CPL so that stack accesses use it. */ 3538 uint8_t const uOldCpl = pIemCpu->uCpl; 3538 3539 pIemCpu->uCpl = uNewCpl; 3539 3540 … … 3550 3551 *uStackFrame.pu32++ = uErr; 3551 3552 uStackFrame.pu32[0] = (fFlags & IEM_XCPT_FLAGS_T_SOFT_INT) ? pCtx->eip + cbInstr : pCtx->eip; 3552 uStackFrame.pu32[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | (pCtx->ss.Sel & X86_SEL_RPL);3553 uStackFrame.pu32[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | uOldCpl; 3553 3554 uStackFrame.pu32[2] = fEfl; 3554 3555 uStackFrame.pu32[3] = pCtx->esp; … … 3568 3569 *uStackFrame.pu16++ = uErr; 3569 3570 uStackFrame.pu16[0] = (fFlags & IEM_XCPT_FLAGS_T_SOFT_INT) ? pCtx->ip + cbInstr : pCtx->ip; 3570 uStackFrame.pu16[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | (pCtx->ss.Sel & X86_SEL_RPL);3571 uStackFrame.pu16[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | uOldCpl; 3571 3572 uStackFrame.pu16[2] = fEfl; 3572 3573 uStackFrame.pu16[3] = pCtx->sp; … … 3624 3625 else 3625 3626 pCtx->rsp = uNewEsp - cbStackFrame; 3626 pIemCpu->uCpl = uNewCpl;3627 3627 3628 3628 if (fEfl & X86_EFL_VM) … … 3879 3879 */ 3880 3880 /* Set the new CPL so that stack accesses use it. */ 3881 uint8_t const uOldCpl = pIemCpu->uCpl; 3881 3882 pIemCpu->uCpl = uNewCpl; 3882 3883 … … 3893 3894 *uStackFrame.pu64++ = uErr; 3894 3895 uStackFrame.pu64[0] = fFlags & IEM_XCPT_FLAGS_T_SOFT_INT ? pCtx->rip + cbInstr : pCtx->rip; 3895 uStackFrame.pu64[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | pIemCpu->uCpl; /* CPL paranoia */3896 uStackFrame.pu64[1] = (pCtx->cs.Sel & ~X86_SEL_RPL) | uOldCpl; /* CPL paranoia */ 3896 3897 uStackFrame.pu64[2] = fEfl; 3897 3898 uStackFrame.pu64[3] = pCtx->rsp; … … 3918 3919 /** @todo research/testcase: Figure out what VT-x and AMD-V loads into the 3919 3920 * hidden registers when interrupting 32-bit or 16-bit code! */ 3920 if (uNewCpl != pIemCpu->uCpl)3921 if (uNewCpl != uOldCpl) 3921 3922 { 3922 3923 pCtx->ss.Sel = 0 | uNewCpl; … … 3935 3936 pCtx->cs.Attr.u = X86DESC_GET_HID_ATTR(&DescCS.Legacy); 3936 3937 pCtx->rip = uNewRip; 3937 pIemCpu->uCpl = uNewCpl;3938 3938 3939 3939 fEfl &= ~fEflToClear;
Note:
See TracChangeset
for help on using the changeset viewer.