Changeset 65207 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jan 9, 2017 1:54:22 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r65192 r65207 1380 1380 { 1381 1381 /* Just grab the new (NULL) SS descriptor. */ 1382 /** @todo testcase: Check whether the zero GDT entry is actually loaded here 1383 * like we do... */ 1382 1384 rcStrict = iemMemFetchSelDesc(pVCpu, &DescSS, uNewSS, X86_XCPT_SS); 1383 1385 if (rcStrict != VINF_SUCCESS) … … 1417 1419 GCPtrParmWds = pCtx->ss.u64Base + uOldRsp; 1418 1420 1419 /* Probe if the write to the new stack will succeed. May #SS(NewSS) or #PF. */ 1420 void *pvNewFrame; 1421 /* HACK ALERT! Probe if the write to the new stack will succeed. May #SS(NewSS) 1422 or #PF, the former is not implemented in this workaround. */ 1423 /** @todo Proper fix callgate target stack exceptions. */ 1424 /** @todo testcase: Cover callgates with partially or fully inaccessible 1425 * target stacks. */ 1426 void *pvNewFrame; 1421 1427 RTGCPTR GCPtrNewStack = X86DESC_BASE(&DescSS.Legacy) + uNewRsp - cbNewStack; 1422 1428 rcStrict = iemMemMap(pVCpu, &pvNewFrame, cbNewStack, UINT8_MAX, GCPtrNewStack, IEM_ACCESS_SYS_RW); … … 1446 1452 1447 1453 /* At this point the stack access must not fail because new state was already committed. */ 1454 /** @todo this can still fail due to SS.LIMIT not check. */ 1448 1455 rcStrict = iemMemStackPushBeginSpecial(pVCpu, cbNewStack, 1449 1456 &uPtrRet.pv, &uNewRsp); 1450 1457 AssertMsgReturn(rcStrict == VINF_SUCCESS, ("BranchCallGate: New stack mapping failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict)), 1451 VERR_I PE_UNEXPECTED_STATUS);1458 VERR_INTERNAL_ERROR_5); 1452 1459 1453 1460 if (!IEM_IS_LONG_MODE(pVCpu)) … … 1459 1466 uPtrRet.pu32[1] = pCtx->cs.Sel; /** @todo Testcase: What is written to the high word when pushing CS? */ 1460 1467 1461 if (cbWords) { 1468 if (cbWords) 1469 { 1462 1470 /* Map the relevant chunk of the old stack. */ 1463 1471 rcStrict = iemMemMap(pVCpu, &uPtrParmWds.pv, cbWords * 4, UINT8_MAX, GCPtrParmWds, IEM_ACCESS_DATA_R); … … 1493 1501 uPtrRet.pu16[1] = pCtx->cs.Sel; 1494 1502 1495 if (cbWords) { 1503 if (cbWords) 1504 { 1496 1505 /* Map the relevant chunk of the old stack. */ 1497 1506 rcStrict = iemMemMap(pVCpu, &uPtrParmWds.pv, cbWords * 2, UINT8_MAX, GCPtrParmWds, IEM_ACCESS_DATA_R);
Note:
See TracChangeset
for help on using the changeset viewer.