- Timestamp:
- Jul 22, 2016 11:10:49 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r62421 r62422 4051 4051 iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->fs, uNewFS); 4052 4052 iemHlpLoadSelectorInV86Mode(pVCpu, &pCtx->gs, uNewGS); 4053 4054 /* quick fix: fake DescSS. */ /** @todo fix the code further down? */ 4055 DescSS.Legacy.u = 0; 4056 DescSS.Legacy.Gen.u16LimitLow = (uint16_t)pCtx->ss.u32Limit; 4057 DescSS.Legacy.Gen.u4LimitHigh = pCtx->ss.u32Limit >> 16; 4058 DescSS.Legacy.Gen.u16BaseLow = (uint16_t)pCtx->ss.u64Base; 4059 DescSS.Legacy.Gen.u8BaseHigh1 = (uint8_t)(pCtx->ss.u64Base >> 16); 4060 DescSS.Legacy.Gen.u8BaseHigh2 = (uint8_t)(pCtx->ss.u64Base >> 24); 4061 DescSS.Legacy.Gen.u4Type = X86_SEL_TYPE_RW_ACC; 4062 DescSS.Legacy.Gen.u2Dpl = 3; 4053 4063 } 4054 4064 else … … 4249 4259 { 4250 4260 /** @todo Intel says \#SS(EXT) for INT/XCPT, I couldn't figure out AMD yet. */ 4251 Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x is out of bounds -> #SS\n", pCtx->ss.Sel, pCtx->esp,4252 cbStackFrame));4261 Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x is out of bounds -> #SS\n", 4262 pCtx->ss.Sel, pCtx->esp, cbStackFrame)); 4253 4263 return iemRaiseStackSelectorNotPresentWithErr(pVCpu, uExt); 4254 4264 } … … 4256 4266 else 4257 4267 { 4258 if ( pCtx->esp - 1 > (DescSS.Legacy.Gen.u 4Type & X86_DESC_DB? UINT32_MAX : UINT32_C(0xffff))4268 if ( pCtx->esp - 1 > (DescSS.Legacy.Gen.u1DefBig ? UINT32_MAX : UINT32_C(0xffff)) 4259 4269 || pCtx->esp - cbStackFrame < cbLimitSS + UINT32_C(1)) 4260 4270 { 4261 Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x (expand down) is out of bounds -> #SS\n", pCtx->ss.Sel, pCtx->esp,4262 cbStackFrame));4271 Log(("iemTaskSwitch: SS=%#x ESP=%#x cbStackFrame=%#x (expand down) is out of bounds -> #SS\n", 4272 pCtx->ss.Sel, pCtx->esp, cbStackFrame)); 4263 4273 return iemRaiseStackSelectorNotPresentWithErr(pVCpu, uExt); 4264 4274 } … … 4272 4282 if (rcStrict != VINF_SUCCESS) 4273 4283 { 4274 Log(("iemTaskSwitch: Can't push error code to new task's stack. %s-bit TSS. rc=%Rrc\n", fIsNewTSS386 ? "32" : "16",4275 VBOXSTRICTRC_VAL(rcStrict)));4284 Log(("iemTaskSwitch: Can't push error code to new task's stack. %s-bit TSS. rc=%Rrc\n", 4285 fIsNewTSS386 ? "32" : "16", VBOXSTRICTRC_VAL(rcStrict))); 4276 4286 return rcStrict; 4277 4287 }
Note:
See TracChangeset
for help on using the changeset viewer.