Changeset 3184
- Timestamp:
- 06/20/07 15:40:16 (2 years ago)
- Files:
-
- trunk/include/VBox/iom.h (modified) (14 diffs)
- trunk/src/VBox/VMM/EM.cpp (modified) (11 diffs)
- trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp (modified) (11 diffs)
- trunk/src/VBox/VMM/VMMGC/IOMGC.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp (modified) (3 diffs)
- trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/VBox/iom.h
r3145 r3184 43 43 /** 44 44 * Macro for checking if an I/O or MMIO emulation call succeeded. 45 * 46 * This macro shall only be used with the IOM APIs where it's mentioned 45 * 46 * This macro shall only be used with the IOM APIs where it's mentioned 47 47 * in the return value description. And there is must be used to correctly 48 48 * determin if the call succeeded and things like the EIP needs updating. 49 * 50 * 49 * 50 * 51 51 * @returns Success indicator (true/false). 52 * 52 * 53 53 * @param rc The status code. This may be evaluated 54 54 * more than once! 55 * 55 * 56 56 * @remark To avoid making assumptions about the layout of the 57 57 * VINF_EM_FIRST...VINF_EM_LAST range we're checking … … 62 62 * VINF_EM_RESCHEDULE_REM status code is the most 63 63 * frequent status code we'll enounter in this range. 64 * 64 * 65 65 * @todo Will have to add VINF_EM_DBG_HYPER_BREAKPOINT if the 66 66 * I/O port and MMIO breakpoints should trigger before … … 298 298 * Reads an I/O port register. 299 299 * 300 * @returns Strict VBox status code. Informational status codes other than the one documented 301 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 302 * @retval VINF_SUCCESS Success. 303 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 300 * @returns Strict VBox status code. Informational status codes other than the one documented 301 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 302 * @retval VINF_SUCCESS Success. 303 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 304 304 * status code must be passed on to EM. 305 305 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) … … 315 315 * Writes to an I/O port register. 316 316 * 317 * @returns Strict VBox status code. Informational status codes other than the one documented 318 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 319 * @retval VINF_SUCCESS Success. 320 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 317 * @returns Strict VBox status code. Informational status codes other than the one documented 318 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 319 * @retval VINF_SUCCESS Success. 320 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 321 321 * status code must be passed on to EM. 322 322 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) … … 332 332 * OUT <DX|imm16>, <AL|AX|EAX> 333 333 * 334 * @returns Strict VBox status code. Informational status codes other than the one documented 335 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 336 * @retval VINF_SUCCESS Success. 337 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 334 * @returns Strict VBox status code. Informational status codes other than the one documented 335 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 336 * @retval VINF_SUCCESS Success. 337 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 338 338 * status code must be passed on to EM. 339 339 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) … … 351 351 * IN <AL|AX|EAX>, <DX|imm16> 352 352 * 353 * @returns Strict VBox status code. Informational status codes other than the one documented 354 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 355 * @retval VINF_SUCCESS Success. 356 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 353 * @returns Strict VBox status code. Informational status codes other than the one documented 354 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 355 * @retval VINF_SUCCESS Success. 356 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 357 357 * status code must be passed on to EM. 358 358 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) … … 371 371 * Reads the string buffer of an I/O port register. 372 372 * 373 * @returns Strict VBox status code. Informational status codes other than the one documented 374 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 375 * @retval VINF_SUCCESS Success. 376 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 373 * @returns Strict VBox status code. Informational status codes other than the one documented 374 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 375 * @retval VINF_SUCCESS Success. 376 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 377 377 * status code must be passed on to EM. 378 378 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) … … 389 389 * Writes the string buffer of an I/O port register. 390 390 * 391 * @returns Strict VBox status code. Informational status codes other than the one documented 391 * @returns Strict VBox status code. Informational status codes other than the one documented 392 392 * here are to be treated as internal failure. 393 393 * @retval VINF_SUCCESS Success. 394 394 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 395 395 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 396 * 396 * 397 397 * @param pVM VM handle. 398 398 * @param Port The port to write. … … 407 407 * ES:EDI,DX[,ECX] 408 408 * 409 * @returns Strict VBox status code. Informational status codes other than the one documented 410 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 411 * @retval VINF_SUCCESS Success. 412 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 409 * @returns Strict VBox status code. Informational status codes other than the one documented 410 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 411 * @retval VINF_SUCCESS Success. 412 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 413 413 * status code must be passed on to EM. 414 414 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 415 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the read to the REM. 415 416 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 416 417 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) … … 429 430 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 430 431 * 431 * @returns Strict VBox status code. Informational status codes other than the one documented 432 * here are to be treated as internal failure. 433 * @retval VINF_SUCCESS Success. 434 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 432 * @returns Strict VBox status code. Informational status codes other than the one documented 433 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 434 * @retval VINF_SUCCESS Success. 435 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 436 * status code must be passed on to EM. 435 437 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 438 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the read to the REM. 436 439 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 437 440 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) … … 450 453 * DS:ESI,DX[,ECX] 451 454 * 452 * @returns Strict VBox status code. Informational status codes other than the one documented 453 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 454 * @retval VINF_SUCCESS Success. 455 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 455 * @returns Strict VBox status code. Informational status codes other than the one documented 456 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 457 * @retval VINF_SUCCESS Success. 458 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 456 459 * status code must be passed on to EM. 457 460 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 461 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the write to the REM. 458 462 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 459 463 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) … … 472 476 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 473 477 * 474 * @returns Strict VBox status code. Informational status codes other than the one documented 475 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 476 * @retval VINF_SUCCESS Success. 477 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 478 * @returns Strict VBox status code. Informational status codes other than the one documented 479 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 480 * @retval VINF_SUCCESS Success. 481 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 478 482 * status code must be passed on to EM. 479 483 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 484 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the write to the REM. 480 485 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 481 486 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) … … 526 531 * level and I/O bitmap. 527 532 * 528 * @returns Strict VBox status code. Informational status codes other than the one documented 533 * @returns Strict VBox status code. Informational status codes other than the one documented 529 534 * here are to be treated as internal failure. 530 535 * @retval VINF_SUCCESS Success. … … 553 558 * trap is a in or out type instruction. (Call it indirectly via EM that is.) 554 559 * 555 * @returns Strict VBox status code. Informational status codes other than the one documented 556 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 557 * @retval VINF_SUCCESS Success. 558 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 560 * @returns Strict VBox status code. Informational status codes other than the one documented 561 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 562 * @retval VINF_SUCCESS Success. 563 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 559 564 * status code must be passed on to EM. 560 565 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) trunk/src/VBox/VMM/EM.cpp
r3145 r3184 729 729 if (pCtx->eflags.Bits.u1VM) 730 730 Log(("EMV86: %04X:%08X IF=%d\n", pCtx->cs, pCtx->eip, pCtx->eflags.Bits.u1IF)); 731 else 731 else 732 732 Log(("EMR%d: %08X ESP=%08X IF=%d CR0=%x\n", cpl, pCtx->eip, pCtx->esp, pCtx->eflags.Bits.u1IF, pCtx->cr0)); 733 733 #endif … … 1119 1119 } 1120 1120 #endif /* LOG_ENABLED */ 1121 1121 1122 1122 /* 1123 1123 * PATM is making life more interesting. … … 1274 1274 if (VBOX_SUCCESS(rc)) 1275 1275 { 1276 rc = VINF_EM_R ESCHEDULE_REM;1276 rc = VINF_EM_RAW_EMULATE_INSTR; 1277 1277 1278 1278 if (!(Cpu.prefix & (PREFIX_REP | PREFIX_REPNE))) … … 1317 1317 } 1318 1318 1319 /* 1319 /* 1320 1320 * Handled the I/O return codes. 1321 * (The unhandled cases end up with rc == VINF_EM_R ESCHEDULE_REM.)1321 * (The unhandled cases end up with rc == VINF_EM_RAW_EMULATE_INSTR.) 1322 1322 */ 1323 1323 if (IOM_SUCCESS(rc)) … … 1341 1341 return rc; 1342 1342 } 1343 AssertMsg(rc == VINF_EM_R ESCHEDULE_REM, ("rc=%Vrc\n", rc));1343 AssertMsg(rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_EM_RESCHEDULE_REM, ("rc=%Vrc\n", rc)); 1344 1344 } 1345 1345 STAM_PROFILE_STOP(&pVM->em.s.StatIOEmu, a); … … 1483 1483 if (pCtx->SysEnter.cs != 0) 1484 1484 { 1485 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 1485 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 1486 1486 SELMIsSelector32Bit(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) ? PATMFL_CODE32 : 0); 1487 1487 if (VBOX_SUCCESS(rc)) … … 1570 1570 #ifdef LOG_ENABLED 1571 1571 DBGFR3InfoLog(pVM, "cpumguest", "Trap in patch code"); 1572 DBGFR3DisasInstrCurrentLog(pVM, "Patch code"); 1572 DBGFR3DisasInstrCurrentLog(pVM, "Patch code"); 1573 1573 1574 1574 DISCPUSTATE Cpu; … … 1576 1576 1577 1577 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->eip, &Cpu, "Patch code: "); 1578 if ( VBOX_SUCCESS(rc) 1578 if ( VBOX_SUCCESS(rc) 1579 1579 && Cpu.pCurInstr->opcode == OP_IRET) 1580 1580 { … … 1734 1734 && !PATMIsPatchGCAddr(pVM, pCtx->eip)) 1735 1735 { 1736 int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 1736 int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 1737 1737 SELMIsSelector32Bit(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) ? PATMFL_CODE32 : 0); 1738 1738 if (VBOX_SUCCESS(rc)) … … 2084 2084 */ 2085 2085 case VINF_PATM_HC_MMIO_PATCH_READ: 2086 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 2086 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 2087 2087 PATMFL_MMIO_ACCESS | (SELMIsSelector32Bit(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) ? PATMFL_CODE32 : 0)); 2088 2088 if (VBOX_FAILURE(rc)) … … 2782 2782 2783 2783 unsigned uSS = pCtx->ss; 2784 if ( pCtx->eflags.Bits.u1VM 2784 if ( pCtx->eflags.Bits.u1VM 2785 2785 || (uSS & X86_SEL_RPL) == 3) 2786 2786 { trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r3180 r3184 1597 1597 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 1598 1598 * 1599 * @returns Strict VBox status code. Informational status codes other than the one documented 1599 * @returns Strict VBox status code. Informational status codes other than the one documented 1600 1600 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 1601 1601 * @retval VINF_SUCCESS Success. 1602 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1602 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1603 1603 * status code must be passed on to EM. 1604 1604 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 1605 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the read to the REM. 1605 1606 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 1606 1607 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) … … 1625 1626 if ( (uPrefix & PREFIX_REPNE) 1626 1627 || pRegFrame->eflags.Bits.u1DF) 1627 return VINF_EM_R ESCHEDULE_REM;1628 return VINF_EM_RAW_EMULATE_INSTR; 1628 1629 1629 1630 /* … … 1644 1645 /* Convert destination address es:edi. */ 1645 1646 RTGCPTR GCPtrDst; 1646 int rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->es, (RTGCPTR)pRegFrame->edi, &pRegFrame->esHid, 1647 int rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->es, (RTGCPTR)pRegFrame->edi, &pRegFrame->esHid, 1647 1648 SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL, 1648 1649 &GCPtrDst, NULL); … … 1650 1651 { 1651 1652 Log(("INS destination address conversion failed -> fallback, rc=%d\n", rc)); 1652 return VINF_EM_R ESCHEDULE_REM;1653 return VINF_EM_RAW_EMULATE_INSTR; 1653 1654 } 1654 1655 … … 1661 1662 { 1662 1663 Log(("INS will generate a trap -> fallback, rc=%d\n", rc)); 1663 return VINF_EM_R ESCHEDULE_REM;1664 return VINF_EM_RAW_EMULATE_INSTR; 1664 1665 } 1665 1666 … … 1708 1709 * ES:EDI,DX[,ECX] 1709 1710 * 1710 * @returns Strict VBox status code. Informational status codes other than the one documented 1711 * @returns Strict VBox status code. Informational status codes other than the one documented 1711 1712 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 1712 1713 * @retval VINF_SUCCESS Success. 1713 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1714 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1714 1715 * status code must be passed on to EM. 1715 1716 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 1717 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the read to the REM. 1716 1718 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 1717 1719 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) … … 1752 1754 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 1753 1755 * 1754 * @returns Strict VBox status code. Informational status codes other than the one documented 1756 * @returns Strict VBox status code. Informational status codes other than the one documented 1755 1757 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 1756 1758 * @retval VINF_SUCCESS Success. 1757 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1759 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1758 1760 * status code must be passed on to EM. 1759 1761 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) … … 1780 1782 if ( (uPrefix & (PREFIX_SEG | PREFIX_REPNE)) 1781 1783 || pRegFrame->eflags.Bits.u1DF) 1782 return VINF_EM_R ESCHEDULE_REM;1784 return VINF_EM_RAW_EMULATE_INSTR; 1783 1785 1784 1786 /* … … 1804 1806 { 1805 1807 Log(("OUTS source address conversion failed -> fallback, rc=%Vrc\n", rc)); 1806 return VINF_EM_R ESCHEDULE_REM;1808 return VINF_EM_RAW_EMULATE_INSTR; 1807 1809 } 1808 1810 … … 1814 1816 { 1815 1817 Log(("OUTS will generate a trap -> fallback, rc=%Vrc\n", rc)); 1816 return VINF_EM_R ESCHEDULE_REM;1818 return VINF_EM_RAW_EMULATE_INSTR; 1817 1819 } 1818 1820 … … 1865 1867 * DS:ESI,DX[,ECX] 1866 1868 * 1867 * @returns Strict VBox status code. Informational status codes other than the one documented 1869 * @returns Strict VBox status code. Informational status codes other than the one documented 1868 1870 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 1869 1871 * @retval VINF_SUCCESS Success. 1870 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1872 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 1871 1873 * status code must be passed on to EM. 1872 1874 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 1875 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the write to the REM. 1873 1876 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 1874 1877 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) trunk/src/VBox/VMM/VMMGC/IOMGC.cpp
r3145 r3184 53 53 * trap is a in or out type instruction. (Call it indirectly via EM that is.) 54 54 * 55 * @returns Strict VBox status code. Informational status codes other than the one documented 55 * @returns Strict VBox status code. Informational status codes other than the one documented 56 56 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 57 57 * @retval VINF_SUCCESS Success. 58 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 58 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 59 59 * status code must be passed on to EM. 60 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 61 * @retval VINF_EM_RAW_EMULATE_INSTR Defer the read to the REM. 60 62 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 61 63 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 62 64 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 63 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)64 65 * 65 66 * @param pVM The virtual machine (GC pointer ofcourse). trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r3172 r3184 390 390 val |= X86_CR0_NE; /* always turn on the native mechanism to report FPU errors (old style uses interrupts) */ 391 391 } 392 if (!(val & X86_CR0_CD)) 392 if (!(val & X86_CR0_CD)) 393 393 val &= ~X86_CR0_NW; /* Illegal when cache is turned on. */ 394 394 … … 1288 1288 } 1289 1289 } 1290 /* 1290 /* 1291 1291 * Handled the I/O return codes. 1292 1292 * (The unhandled cases end up with rc == VINF_EM_RESCHEDULE_REM.) … … 1310 1310 Assert(IoExitInfo.n.u1Type == 0); 1311 1311 else 1312 AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 1313 #endif 1314 /* Force instruction emulation and not a reschedule to the recompiler as that will come right back to us */ 1315 if (rc == VINF_EM_RESCHEDULE_REM) 1316 rc = VINF_IOM_HC_IOPORT_WRITE; 1312 AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 1313 #endif 1317 1314 Log2(("Failed IO at %VGv %x size %d\n", pCtx->eip, IoExitInfo.n.u16Port, uIOSize)); 1318 1315 break; trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r3172 r3184 1727 1727 } 1728 1728 } 1729 /* 1729 /* 1730 1730 * Handled the I/O return codes. 1731 1731 * (The unhandled cases end up with rc == VINF_EM_RESCHEDULE_REM.) … … 1748 1748 Assert(fIOWrite); 1749 1749 else 1750 AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 1751 #endif 1752 /* Force instruction emulation and not a reschedule to the recompiler as that will come right back to us */ 1753 if (rc == VINF_EM_RESCHEDULE_REM) 1754 rc = VINF_IOM_HC_IOPORT_WRITE; 1750 AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 1751 #endif 1755 1752 break; 1756 1753 }

