Changeset 2218 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 19, 2007 12:14:38 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r2217 r2218 1221 1221 } 1222 1222 1223 if ( IoExitInfo.n.u1REP 1224 || IoExitInfo.n.u1STR 1225 ) 1226 { 1223 if (IoExitInfo.n.u1STR) 1224 { 1225 /* ins/outs */ 1227 1226 uint32_t prefix = 0; 1228 1227 if (IoExitInfo.n.u1REP) … … 1244 1243 else 1245 1244 { 1245 /* normal in/out */ 1246 Assert(!IoExitInfo.n.u1REP); 1247 1246 1248 if (IoExitInfo.n.u1Type == 0) 1247 1249 { … … 1273 1275 Assert(rc == VINF_IOM_HC_IOPORT_READ || rc == VINF_IOM_HC_IOPORT_WRITE); 1274 1276 rc = (IoExitInfo.n.u1Type == 0) ? VINF_IOM_HC_IOPORT_WRITE : VINF_IOM_HC_IOPORT_READ; 1275 1276 1277 Log2(("Failed IO at %VGv %x size %d\n", pCtx->eip, IoExitInfo.n.u16Port, uIOSize)); 1277 1278 break; -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r2124 r2218 1550 1550 uint32_t uIOWidth = VMX_EXIT_QUALIFICATION_IO_WIDTH(exitQualification); 1551 1551 uint32_t uPort; 1552 bool fIOWrite = (VMX_EXIT_QUALIFICATION_IO_DIRECTION(exitQualification) == VMX_EXIT_QUALIFICATION_IO_DIRECTION_OUT); 1552 1553 1553 1554 /** @todo necessary to make the distinction? */ … … 1559 1560 uPort = VMX_EXIT_QUALIFICATION_IO_PORT(exitQualification); /* Immediate encoding. */ 1560 1561 1561 /* First simple in and out instructions. */ 1562 /** @todo str & rep */ 1563 if ( !VMX_EXIT_QUALIFICATION_IO_STRING(exitQualification) 1564 && !VMX_EXIT_QUALIFICATION_IO_REP(exitQualification) 1565 /* paranoid checks ahead */ 1566 && uIOWidth != 2 1567 && uIOWidth < 4 1568 ) 1569 { 1570 uint32_t cbSize = aIOSize[uIOWidth]; 1562 /* paranoia */ 1563 if (RT_UNLIKELY(uIOWidth == 2 || uIOWidth >= 4)) 1564 { 1565 rc = VINF_IOM_HC_IOPORT_READWRITE; 1566 break; 1567 } 1568 1569 uint32_t cbSize = aIOSize[uIOWidth]; 1570 1571 if (VMX_EXIT_QUALIFICATION_IO_STRING(exitQualification)) 1572 { 1573 /* ins/outs */ 1574 uint32_t prefix = 0; 1575 if (VMX_EXIT_QUALIFICATION_IO_REP(exitQualification)) 1576 prefix |= PREFIX_REP; 1577 1578 if (fIOWrite) 1579 { 1580 Log2(("IOMInterpretOUTSEx %VGv %x size=%d\n", pCtx->eip, uPort, cbSize)); 1581 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitIOStringWrite); 1582 rc = IOMInterpretOUTSEx(pVM, CPUMCTX2CORE(pCtx), uPort, prefix, cbSize); 1583 } 1584 else 1585 { 1586 Log2(("IOMInterpretINSEx %VGv %x size=%d\n", pCtx->eip, uPort, cbSize)); 1587 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitIOStringRead); 1588 rc = IOMInterpretINSEx(pVM, CPUMCTX2CORE(pCtx), uPort, prefix, cbSize); 1589 } 1590 } 1591 else 1592 { 1593 /* normal in/out */ 1571 1594 uint32_t uAndVal = aIOOpAnd[uIOWidth]; 1572 1595 1573 if (VMX_EXIT_QUALIFICATION_IO_DIRECTION(exitQualification) == VMX_EXIT_QUALIFICATION_IO_DIRECTION_OUT) 1596 Assert(!VMX_EXIT_QUALIFICATION_IO_REP(exitQualification)); 1597 1598 if (fIOWrite) 1574 1599 { 1575 1600 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitIOWrite); … … 1588 1613 } 1589 1614 } 1590 if (rc == VINF_SUCCESS) 1591 { 1592 /* Update EIP and continue execution. */ 1593 pCtx->eip += cbInstr; 1594 STAM_PROFILE_ADV_STOP(&pVM->hwaccm.s.StatExit, x); 1595 goto ResumeExecution; 1596 } 1597 Assert(rc == VINF_IOM_HC_IOPORT_READ || rc == VINF_IOM_HC_IOPORT_WRITE); 1598 rc = (VMX_EXIT_QUALIFICATION_IO_DIRECTION(exitQualification) == VMX_EXIT_QUALIFICATION_IO_DIRECTION_OUT) 1599 ? VINF_IOM_HC_IOPORT_WRITE : VINF_IOM_HC_IOPORT_READ; 1600 } 1601 else 1602 rc = VINF_IOM_HC_IOPORT_READWRITE; 1615 } 1616 if (rc == VINF_SUCCESS) 1617 { 1618 /* Update EIP and continue execution. */ 1619 pCtx->eip += cbInstr; 1620 STAM_PROFILE_ADV_STOP(&pVM->hwaccm.s.StatExit, x); 1621 goto ResumeExecution; 1622 } 1623 Assert(rc == VINF_IOM_HC_IOPORT_READ || rc == VINF_IOM_HC_IOPORT_WRITE); 1624 rc = (fIOWrite) ? VINF_IOM_HC_IOPORT_WRITE : VINF_IOM_HC_IOPORT_READ; 1603 1625 1604 1626 break;
Note:
See TracChangeset
for help on using the changeset viewer.