vbox的更動 2504 路徑 trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
- 時間撮記:
- 2007-5-4 下午06:12:30 (18 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r2363 r2504 460 460 461 461 462 inline intiomRamRead(PVM pVM, void *pDest, RTGCPTR GCSrc, uint32_t cb)462 DECLINLINE(int) iomRamRead(PVM pVM, void *pDest, RTGCPTR GCSrc, uint32_t cb) 463 463 { 464 464 #ifdef IN_GC … … 479 479 } 480 480 481 inline intiomRamWrite(PVM pVM, RTGCPTR GCDest, void *pSrc, uint32_t cb)481 DECLINLINE(int) iomRamWrite(PVM pVM, RTGCPTR GCDest, void *pSrc, uint32_t cb) 482 482 { 483 483 #ifdef IN_GC … … 1589 1589 * ES:EDI,DX[,ECX] 1590 1590 * 1591 * @note Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 1592 * 1593 * @returns VBox status code. 1591 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 1592 * 1593 * @returns Strict VBox status code. Informational status codes other than the one documented 1594 * here are to be treated as internal failure. 1595 * @retval VINF_SUCCESS Success. 1596 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 1597 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 1598 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 1599 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 1600 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 1594 1601 * 1595 1602 * @param pVM The virtual machine (GC pointer ofcourse). … … 1601 1608 IOMDECL(int) IOMInterpretINSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer) 1602 1609 { 1603 int rc = VINF_SUCCESS;1604 1605 1610 #ifdef VBOX_WITH_STATISTICS 1606 1611 STAM_COUNTER_INC(&pVM->iom.s.StatGCInstIns); … … 1628 1633 /* Convert destination address es:edi. */ 1629 1634 RTGCPTR GCPtrDst; 1630 rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->es, (RTGCPTR)pRegFrame->edi, &pRegFrame->esHid,1631 SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL,1632 &GCPtrDst, NULL);1635 int rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->es, (RTGCPTR)pRegFrame->edi, &pRegFrame->esHid, 1636 SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL, 1637 &GCPtrDst, NULL); 1633 1638 if (VBOX_FAILURE(rc)) 1634 1639 { … … 1683 1688 pRegFrame->ecx = cTransfers; 1684 1689 1690 AssertMsg(rc == VINF_SUCCESS || rc == VINF_IOM_HC_IOPORT_READ || (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST) || VBOX_FAILURE(rc), ("%Vrc\n", rc)); 1685 1691 return rc; 1686 1692 } … … 1691 1697 * ES:EDI,DX[,ECX] 1692 1698 * 1693 * @returns VBox status code. 1699 * @returns Strict VBox status code. Informational status codes other than the one documented 1700 * here are to be treated as internal failure. 1701 * @retval VINF_SUCCESS Success. 1702 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 1703 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 1704 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 1705 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 1706 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 1694 1707 * 1695 1708 * @param pVM The virtual machine (GC pointer ofcourse). … … 1712 1725 int rc = IOMInterpretCheckPortIOAccess(pVM, pRegFrame, uPort, cbSize); 1713 1726 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 1727 { 1728 AssertMsg(rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_TRPM_XCPT_DISPATCHED || VBOX_FAILURE(rc), ("%Vrc\n", rc)); 1714 1729 return rc; 1730 } 1715 1731 1716 1732 return IOMInterpretINSEx(pVM, pRegFrame, uPort, pCpu->prefix, cbSize); 1717 1733 } 1734 1718 1735 1719 1736 /** … … 1721 1738 * DS:ESI,DX[,ECX] 1722 1739 * 1723 * @note Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 1724 * 1725 * @returns VBox status code. 1740 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 1741 * 1742 * @returns Strict VBox status code. Informational status codes other than the one documented 1743 * here are to be treated as internal failure. 1744 * @retval VINF_SUCCESS Success. 1745 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 1746 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 1747 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 1748 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 1749 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 1726 1750 * 1727 1751 * @param pVM The virtual machine (GC pointer ofcourse). … … 1733 1757 IOMDECL(int) IOMInterpretOUTSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer) 1734 1758 { 1735 int rc = VINF_SUCCESS;1736 1737 1759 #ifdef VBOX_WITH_STATISTICS 1738 1760 STAM_COUNTER_INC(&pVM->iom.s.StatGCInstOuts); … … 1760 1782 /* Convert source address ds:esi. */ 1761 1783 RTGCPTR GCPtrSrc; 1762 rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->ds, (RTGCPTR)pRegFrame->esi, &pRegFrame->dsHid,1763 SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL,1764 &GCPtrSrc, NULL);1784 int rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->ds, (RTGCPTR)pRegFrame->esi, &pRegFrame->dsHid, 1785 SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL, 1786 &GCPtrSrc, NULL); 1765 1787 if (VBOX_FAILURE(rc)) 1766 1788 { 1767 Log(("OUTS source address conversion failed -> fallback, rc=% d\n", rc));1789 Log(("OUTS source address conversion failed -> fallback, rc=%Vrc\n", rc)); 1768 1790 return VINF_IOM_HC_IOPORT_WRITE; 1769 1791 } … … 1775 1797 if (rc != VINF_SUCCESS) 1776 1798 { 1777 Log(("OUTS will generate a trap -> fallback, rc=% d\n", rc));1799 Log(("OUTS will generate a trap -> fallback, rc=%Vrc\n", rc)); 1778 1800 return VINF_IOM_HC_IOPORT_WRITE; 1779 1801 } … … 1783 1805 { 1784 1806 /* 1785 * If the device supports string transfers, ask it to do as1786 * much as it wants. The rest is done with single-word transfers.1787 */1807 * If the device supports string transfers, ask it to do as 1808 * much as it wants. The rest is done with single-word transfers. 1809 */ 1788 1810 const RTGCUINTREG cTransfersOrg = cTransfers; 1789 1811 rc = IOMIOPortWriteString(pVM, uPort, &GCPtrSrc, &cTransfers, cbTransfer); … … 1803 1825 break; 1804 1826 rc = IOMIOPortWrite(pVM, uPort, u32Value, cbTransfer); 1805 if (rc == VINF_IOM_HC_IOPORT_WRITE )1827 if (rc == VINF_IOM_HC_IOPORT_WRITE || VBOX_FAILURE(rc)) 1806 1828 break; 1807 1829 GCPtrSrc = (RTGCPTR)((RTUINTPTR)GCPtrSrc + cbTransfer); … … 1817 1839 if (uPrefix & PREFIX_REP) 1818 1840 pRegFrame->ecx = cTransfers; 1841 1842 AssertMsg(rc == VINF_SUCCESS || rc == VINF_IOM_HC_IOPORT_WRITE || (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST) || VBOX_FAILURE(rc), ("%Vrc\n", rc)); 1819 1843 return rc; 1820 1844 } 1821 1822 1845 1823 1846 … … 1826 1849 * DS:ESI,DX[,ECX] 1827 1850 * 1828 * @returns VBox status code. 1851 * @returns Strict VBox status code. Informational status codes other than the one documented 1852 * here are to be treated as internal failure. 1853 * @retval VINF_SUCCESS Success. 1854 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 1855 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 1856 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 1857 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 1858 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 1829 1859 * 1830 1860 * @param pVM The virtual machine (GC pointer ofcourse). … … 1849 1879 int rc = IOMInterpretCheckPortIOAccess(pVM, pRegFrame, uPort, cbSize); 1850 1880 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 1881 { 1882 AssertMsg(rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_TRPM_XCPT_DISPATCHED || VBOX_FAILURE(rc), ("%Vrc\n", rc)); 1851 1883 return rc; 1884 } 1852 1885 1853 1886 return IOMInterpretOUTSEx(pVM, pRegFrame, uPort, pCpu->prefix, cbSize); 1854 1887 } 1888
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器