VirtualBox

Changeset 65631 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Feb 6, 2017 5:38:05 PM (8 years ago)
Author:
vboxsync
Message:

IEM: When loading a 16-bit stack from TSS, consistently force a 16-bit stack pointer.

File:
1 edited

Legend:

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

    r65623 r65631  
    45744574        if (rcStrict != VINF_SUCCESS)
    45754575            return rcStrict;
     4576        /* If the new SS is 16-bit, we are only going to use SP, not ESP. */
     4577        if (!DescSS.Legacy.Gen.u1DefBig)
     4578        {
     4579            Log(("iemRaiseXcptOrIntInProtMode: Forcing ESP=%#x to 16 bits\n", uNewEsp));
     4580            uNewEsp = (uint16_t)uNewEsp;
     4581        }
     4582
    45764583        Log7(("iemRaiseXcptOrIntInProtMode: New SS=%#x ESP=%#x (from TSS); current SS=%#x ESP=%#x\n", NewSS, uNewEsp, pCtx->ss.Sel, pCtx->esp));
    45774584
     
    45944601        else
    45954602        {
    4596             if (   uNewEsp - 1 > (DescSS.Legacy.Gen.u4Type & X86_DESC_DB ? UINT32_MAX : UINT32_C(0xffff))
     4603            if (   uNewEsp - 1 > (DescSS.Legacy.Gen.u1DefBig ? UINT32_MAX : UINT16_MAX)
    45974604                || uNewEsp - cbStackFrame < cbLimitSS + UINT32_C(1))
    45984605            {
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