- Timestamp:
- Oct 8, 2018 11:19:32 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h
r74603 r74668 34 34 35 35 #if ADDR_SIZE == 16 36 # define ADDR_rDI di 37 # define ADDR_rSI si 38 # define ADDR_rCX cx 39 # define ADDR2_TYPE uint32_t 36 # define ADDR_rDI di 37 # define ADDR_rSI si 38 # define ADDR_rCX cx 39 # define ADDR2_TYPE uint32_t 40 # define ADDR_VMXSTRIO 0 40 41 #elif ADDR_SIZE == 32 41 # define ADDR_rDI edi 42 # define ADDR_rSI esi 43 # define ADDR_rCX ecx 44 # define ADDR2_TYPE uint32_t 42 # define ADDR_rDI edi 43 # define ADDR_rSI esi 44 # define ADDR_rCX ecx 45 # define ADDR2_TYPE uint32_t 46 # define ADDR_VMXSTRIO 1 45 47 #elif ADDR_SIZE == 64 46 # define ADDR_rDI rdi 47 # define ADDR_rSI rsi 48 # define ADDR_rCX rcx 49 # define ADDR2_TYPE uint64_t 48 # define ADDR_rDI rdi 49 # define ADDR_rSI rsi 50 # define ADDR_rCX rcx 51 # define ADDR2_TYPE uint64_t 52 # define ADDR_VMXSTRIO 2 50 53 # define IS_64_BIT_CODE(a_pVCpu) (true) 51 54 #else … … 1204 1207 } 1205 1208 1209 /* 1210 * Check nested-guest I/O intercepts. 1211 */ 1212 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1213 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 1214 { 1215 VMXEXITINSTRINFO ExitInstrInfo; 1216 ExitInstrInfo.u = 0; 1217 ExitInstrInfo.StrIo.u3AddrSize = ADDR_VMXSTRIO; 1218 ExitInstrInfo.StrIo.iSegReg = X86_SREG_ES; 1219 rcStrict = iemVmxVmexitInstrStrIo(pVCpu, VMXINSTRID_IO_INS, pVCpu->cpum.GstCtx.dx, (OP_SIZE / 8) - 1, false /* fRep */, 1220 ExitInstrInfo, cbInstr); 1221 if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE) 1222 return rcStrict; 1223 } 1224 #endif 1225 1206 1226 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 1207 /*1208 * Check SVM nested-guest IO intercept.1209 */1210 1227 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1211 1228 { 1212 rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_IN, OP_SIZE / 8, ADDR_SIZE, X86_SREG_ES, false /* fRep */,1213 true /* fStrIo */, cbInstr);1229 rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_IN, OP_SIZE / 8, ADDR_SIZE, X86_SREG_ES, 1230 false /* fRep */, true /* fStrIo */, cbInstr); 1214 1231 if (rcStrict == VINF_SVM_VMEXIT) 1215 1232 return VINF_SUCCESS; 1216 1233 if (rcStrict != VINF_SVM_INTERCEPT_NOT_ACTIVE) 1217 1234 { 1218 Log(("iemCImpl_ins_op: iemSvmHandleIOIntercept failed (u16Port=%#x, cbReg=%u) rc=%Rrc\n", pVCpu->cpum.GstCtx.dx, OP_SIZE / 8,1219 VBOXSTRICTRC_VAL(rcStrict)));1235 Log(("iemCImpl_ins_op: iemSvmHandleIOIntercept failed (u16Port=%#x, cbReg=%u) rc=%Rrc\n", pVCpu->cpum.GstCtx.dx, 1236 OP_SIZE / 8, VBOXSTRICTRC_VAL(rcStrict))); 1220 1237 return rcStrict; 1221 1238 } … … 1275 1292 } 1276 1293 1294 /* 1295 * Check nested-guest I/O intercepts. 1296 */ 1297 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1298 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 1299 { 1300 VMXEXITINSTRINFO ExitInstrInfo; 1301 ExitInstrInfo.u = 0; 1302 ExitInstrInfo.StrIo.u3AddrSize = ADDR_VMXSTRIO; 1303 ExitInstrInfo.StrIo.iSegReg = X86_SREG_ES; 1304 rcStrict = iemVmxVmexitInstrStrIo(pVCpu, VMXINSTRID_IO_INS, pVCpu->cpum.GstCtx.dx, (OP_SIZE / 8) - 1, true /* fRep */, 1305 ExitInstrInfo, cbInstr); 1306 if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE) 1307 return rcStrict; 1308 } 1309 #endif 1310 1277 1311 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 1278 /*1279 * Check SVM nested-guest IO intercept.1280 */1281 1312 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1282 1313 { … … 1476 1507 } 1477 1508 1509 /* 1510 * Check nested-guest I/O intercepts. 1511 */ 1512 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1513 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 1514 { 1515 VMXEXITINSTRINFO ExitInstrInfo; 1516 ExitInstrInfo.u = 0; 1517 ExitInstrInfo.StrIo.u3AddrSize = ADDR_VMXSTRIO; 1518 ExitInstrInfo.StrIo.iSegReg = iEffSeg; 1519 rcStrict = iemVmxVmexitInstrStrIo(pVCpu, VMXINSTRID_IO_OUTS, pVCpu->cpum.GstCtx.dx, (OP_SIZE / 8) - 1, false /* fRep */, 1520 ExitInstrInfo, cbInstr); 1521 if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE) 1522 return rcStrict; 1523 } 1524 #endif 1525 1478 1526 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 1479 /*1480 * Check SVM nested-guest IO intercept.1481 */1482 1527 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1483 1528 { 1484 rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_OUT, OP_SIZE / 8, ADDR_SIZE, iEffSeg, false /* fRep */,1485 true /* fStrIo */, cbInstr);1529 rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_OUT, OP_SIZE / 8, ADDR_SIZE, iEffSeg, 1530 false /* fRep */, true /* fStrIo */, cbInstr); 1486 1531 if (rcStrict == VINF_SVM_VMEXIT) 1487 1532 return VINF_SUCCESS; 1488 1533 if (rcStrict != VINF_SVM_INTERCEPT_NOT_ACTIVE) 1489 1534 { 1490 Log(("iemCImpl_outs_op: iemSvmHandleIOIntercept failed (u16Port=%#x, cbReg=%u) rc=%Rrc\n", pVCpu->cpum.GstCtx.dx, OP_SIZE / 8,1491 VBOXSTRICTRC_VAL(rcStrict)));1535 Log(("iemCImpl_outs_op: iemSvmHandleIOIntercept failed (u16Port=%#x, cbReg=%u) rc=%Rrc\n", pVCpu->cpum.GstCtx.dx, 1536 OP_SIZE / 8, VBOXSTRICTRC_VAL(rcStrict))); 1492 1537 return rcStrict; 1493 1538 } … … 1535 1580 } 1536 1581 1582 /* 1583 * Check nested-guest I/O intercepts. 1584 */ 1585 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1586 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 1587 { 1588 VMXEXITINSTRINFO ExitInstrInfo; 1589 ExitInstrInfo.u = 0; 1590 ExitInstrInfo.StrIo.u3AddrSize = ADDR_VMXSTRIO; 1591 ExitInstrInfo.StrIo.iSegReg = iEffSeg; 1592 rcStrict = iemVmxVmexitInstrStrIo(pVCpu, VMXINSTRID_IO_OUTS, pVCpu->cpum.GstCtx.dx, (OP_SIZE / 8) - 1, true /* fRep */, 1593 ExitInstrInfo, cbInstr); 1594 if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE) 1595 return rcStrict; 1596 } 1597 #endif 1598 1537 1599 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 1538 /*1539 * Check SVM nested-guest IO intercept.1540 */1541 1600 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1542 1601 { … … 1706 1765 #undef ADDR_TYPE 1707 1766 #undef ADDR2_TYPE 1767 #undef ADDR_VMXSTRIO 1708 1768 #undef IS_64_BIT_CODE 1709 1769 #undef IEM_CHECK_FF_YIELD_REPSTR_MAYBE_RETURN
Note:
See TracChangeset
for help on using the changeset viewer.