Changeset 65179 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jan 6, 2017 10:38:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r65178 r65179 1456 1456 uPtrRet.pu32[1] = pCtx->cs.Sel; /** @todo Testcase: What is written to the high word when pushing CS? */ 1457 1457 1458 /* Map the relevant chunk of the old stack. */ 1459 rcStrict = iemMemMap(pVCpu, &uPtrParmWds.pv, cbWords * 4, UINT8_MAX, GCPtrParmWds, IEM_ACCESS_DATA_R); 1460 if (rcStrict != VINF_SUCCESS) 1461 { 1462 Log(("BranchCallGate: Old stack mapping (32-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1463 return rcStrict; 1464 } 1465 1466 /* Copy the parameter (d)words. */ 1467 for (int i = 0; i < cbWords; ++i) 1468 uPtrRet.pu32[2 + i] = uPtrParmWds.pu32[i]; 1469 1470 /* Unmap the old stack. */ 1471 rcStrict = iemMemCommitAndUnmap(pVCpu, uPtrParmWds.pv, IEM_ACCESS_DATA_R); 1472 if (rcStrict != VINF_SUCCESS) 1473 { 1474 Log(("BranchCallGate: Old stack unmapping (32-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1475 return rcStrict; 1458 if (cbWords) { 1459 /* Map the relevant chunk of the old stack. */ 1460 rcStrict = iemMemMap(pVCpu, &uPtrParmWds.pv, cbWords * 4, UINT8_MAX, GCPtrParmWds, IEM_ACCESS_DATA_R); 1461 if (rcStrict != VINF_SUCCESS) 1462 { 1463 Log(("BranchCallGate: Old stack mapping (32-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1464 return rcStrict; 1465 } 1466 1467 /* Copy the parameter (d)words. */ 1468 for (int i = 0; i < cbWords; ++i) 1469 uPtrRet.pu32[2 + i] = uPtrParmWds.pu32[i]; 1470 1471 /* Unmap the old stack. */ 1472 rcStrict = iemMemCommitAndUnmap(pVCpu, uPtrParmWds.pv, IEM_ACCESS_DATA_R); 1473 if (rcStrict != VINF_SUCCESS) 1474 { 1475 Log(("BranchCallGate: Old stack unmapping (32-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1476 return rcStrict; 1477 } 1476 1478 } 1477 1479 … … 1488 1490 uPtrRet.pu16[1] = pCtx->cs.Sel; 1489 1491 1490 /* Map the relevant chunk of the old stack. */ 1491 rcStrict = iemMemMap(pVCpu, &uPtrParmWds.pv, cbWords * 2, UINT8_MAX, GCPtrParmWds, IEM_ACCESS_DATA_R); 1492 if (rcStrict != VINF_SUCCESS) 1493 { 1494 Log(("BranchCallGate: Old stack mapping (16-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1495 return rcStrict; 1496 } 1497 1498 /* Copy the parameter words. */ 1499 for (int i = 0; i < cbWords; ++i) 1500 uPtrRet.pu16[2 + i] = uPtrParmWds.pu16[i]; 1501 1502 /* Unmap the old stack. */ 1503 rcStrict = iemMemCommitAndUnmap(pVCpu, uPtrParmWds.pv, IEM_ACCESS_DATA_R); 1504 if (rcStrict != VINF_SUCCESS) 1505 { 1506 Log(("BranchCallGate: Old stack unmapping (32-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1507 return rcStrict; 1492 if (cbWords) { 1493 /* Map the relevant chunk of the old stack. */ 1494 rcStrict = iemMemMap(pVCpu, &uPtrParmWds.pv, cbWords * 2, UINT8_MAX, GCPtrParmWds, IEM_ACCESS_DATA_R); 1495 if (rcStrict != VINF_SUCCESS) 1496 { 1497 Log(("BranchCallGate: Old stack mapping (16-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1498 return rcStrict; 1499 } 1500 1501 /* Copy the parameter words. */ 1502 for (int i = 0; i < cbWords; ++i) 1503 uPtrRet.pu16[2 + i] = uPtrParmWds.pu16[i]; 1504 1505 /* Unmap the old stack. */ 1506 rcStrict = iemMemCommitAndUnmap(pVCpu, uPtrParmWds.pv, IEM_ACCESS_DATA_R); 1507 if (rcStrict != VINF_SUCCESS) 1508 { 1509 Log(("BranchCallGate: Old stack unmapping (32-bit) failed (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict))); 1510 return rcStrict; 1511 } 1508 1512 } 1509 1513
Note:
See TracChangeset
for help on using the changeset viewer.