Changeset 89200 in vbox
- Timestamp:
- May 20, 2021 2:05:10 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r89069 r89200 1525 1525 * @param uTagSrc The IRQ tag and source (for tracing). 1526 1526 */ 1527 DECLR0CALLBACKMEMBER( int,pfnSendMsi,(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc));1527 DECLR0CALLBACKMEMBER(void, pfnSendMsi,(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc)); 1528 1528 1529 1529 /** Just a safety precaution. */ … … 1536 1536 1537 1537 /** Current PDMIOMMUHLPR0 version number. */ 1538 #define PDM_IOMMUHLPR0_VERSION PDM_VERSION_MAKE(0xff13, 4, 0)1538 #define PDM_IOMMUHLPR0_VERSION PDM_VERSION_MAKE(0xff13, 5, 0) 1539 1539 1540 1540 … … 1579 1579 * @param uTagSrc The IRQ tag and source (for tracing). 1580 1580 */ 1581 DECLRCCALLBACKMEMBER( int,pfnSendMsi,(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc));1581 DECLRCCALLBACKMEMBER(void, pfnSendMsi,(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc)); 1582 1582 1583 1583 /** Just a safety precaution. */ … … 1590 1590 1591 1591 /** Current PDMIOMMUHLPRC version number. */ 1592 #define PDM_IOMMUHLPRC_VERSION PDM_VERSION_MAKE(0xff14, 4, 0)1592 #define PDM_IOMMUHLPRC_VERSION PDM_VERSION_MAKE(0xff14, 5, 0) 1593 1593 1594 1594 … … 1633 1633 * @param uTagSrc The IRQ tag and source (for tracing). 1634 1634 */ 1635 DECLR3CALLBACKMEMBER( int,pfnSendMsi,(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc));1635 DECLR3CALLBACKMEMBER(void, pfnSendMsi,(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc)); 1636 1636 1637 1637 /** Just a safety precaution. */ … … 1644 1644 1645 1645 /** Current PDMIOMMUHLPR3 version number. */ 1646 #define PDM_IOMMUHLPR3_VERSION PDM_VERSION_MAKE(0xff15, 4, 0)1646 #define PDM_IOMMUHLPR3_VERSION PDM_VERSION_MAKE(0xff15, 5, 0) 1647 1647 1648 1648 -
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r88562 r89200 224 224 * @param pMsi The MSI to send. 225 225 * @param uTagSrc The IRQ tag and source tracer ID. 226 * 227 * @remarks Atm, don't call this from ring-0. Use the respective R0 device helpers 228 * instead. 226 229 */ 227 230 VMM_INT_DECL(int) PDMIoApicSendMsi(PVM pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc) 228 231 { 232 /** @todo We should somehow move/make this to ring-3 only, as in ring-0, the helper 233 * code handles queuing the MSI to be sent from ring-3 when I/O APIC isn't 234 * available in R0. When this TODO is done, remove the remark in the doxygen 235 * above. */ 229 236 Assert(PCIBDF_IS_VALID(uBusDevFn)); 230 237 if (pVM->pdm.s.IoApic.CTX_SUFF(pDevIns)) -
trunk/src/VBox/VMM/VMMR0/PDMR0DevHlp.cpp
r89069 r89200 1626 1626 1627 1627 1628 /** @interface_method_impl{PDMPCIHLPR0,pfnIoApicSendMsi} */ 1629 static DECLCALLBACK(void) pdmR0PciHlp_IoApicSendMsi(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc) 1630 { 1631 PDMDEV_ASSERT_DEVINS(pDevIns); 1632 Assert(PCIBDF_IS_VALID(uBusDevFn)); 1633 Log4(("pdmR0PciHlp_IoApicSendMsi: uBusDevFn=%#x Msi=(Addr:%#RX64 Data:%#RX32) uTagSrc=%#x\n", uBusDevFn, pMsi->Addr.u64, 1634 pMsi->Data.u32, uTagSrc)); 1628 /** 1629 * Helper for sending an MSI via the I/O APIC. 1630 * 1631 * @param pDevIns PCI device instance. 1632 * @param uBusDevFn The bus:device:function of the device initiating the MSI. 1633 * @param pMsi The MSI to send. 1634 * @param uTagSrc The IRQ tag and source (for tracing). 1635 */ 1636 static void pdmR0IoApicSendMsi(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc) 1637 { 1635 1638 PGVM pGVM = pDevIns->Internal.s.pGVM; 1636 1639 if (pGVM->pdm.s.IoApic.pDevInsR0) … … 1656 1659 1657 1660 1661 /** @interface_method_impl{PDMPCIHLPR0,pfnIoApicSendMsi} */ 1662 static DECLCALLBACK(void) pdmR0PciHlp_IoApicSendMsi(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc) 1663 { 1664 PDMDEV_ASSERT_DEVINS(pDevIns); 1665 Assert(PCIBDF_IS_VALID(uBusDevFn)); 1666 Log4(("pdmR0PciHlp_IoApicSendMsi: uBusDevFn=%#x Msi=(Addr:%#RX64 Data:%#RX32) uTagSrc=%#x\n", uBusDevFn, pMsi->Addr.u64, 1667 pMsi->Data.u32, uTagSrc)); 1668 pdmR0IoApicSendMsi(pDevIns, uBusDevFn, pMsi, uTagSrc); 1669 } 1670 1671 1658 1672 /** @interface_method_impl{PDMPCIHLPR0,pfnLock} */ 1659 1673 static DECLCALLBACK(int) pdmR0PciHlp_Lock(PPDMDEVINS pDevIns, int rc) … … 1731 1745 1732 1746 /** @interface_method_impl{PDMIOMMUHLPR0,pfnSendMsi} */ 1733 static DECLCALLBACK(int) pdmR0IommuHlp_SendMsi(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc) 1734 { 1735 PDMDEV_ASSERT_DEVINS(pDevIns); 1736 PGVM pGVM = pDevIns->Internal.s.pGVM; 1737 if (pGVM->pdm.s.IoApic.pDevInsR0) 1738 { 1739 Assert(pGVM->pdm.s.IoApic.pfnSendMsiR0); 1740 pGVM->pdm.s.IoApic.pfnSendMsiR0(pGVM->pdm.s.IoApic.pDevInsR0, NIL_PCIBDF, pMsi, uTagSrc); 1741 return VINF_SUCCESS; 1742 } 1743 1744 /** @todo Implement this. */ 1745 AssertMsgFailedReturn(("Queue PDM task for sending the MSI in ring-3"), VERR_IOMMU_IPE_5); 1747 static DECLCALLBACK(void) pdmR0IommuHlp_SendMsi(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc) 1748 { 1749 PDMDEV_ASSERT_DEVINS(pDevIns); 1750 pdmR0IoApicSendMsi(pDevIns, NIL_PCIBDF, pMsi, uTagSrc); 1746 1751 } 1747 1752 -
trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
r89065 r89200 299 299 300 300 /** @interface_method_impl{PDMIOMMUHLPR3,pfnSendMsi} */ 301 static DECLCALLBACK( int) pdmR3IommuHlp_SendMsi(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc)301 static DECLCALLBACK(void) pdmR3IommuHlp_SendMsi(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc) 302 302 { 303 303 PDMDEV_ASSERT_DEVINS(pDevIns); 304 304 LogFlowFunc(("caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance)); 305 returnPDMIoApicSendMsi(pDevIns->Internal.s.pVMR3, NIL_PCIBDF, pMsi, uTagSrc);305 PDMIoApicSendMsi(pDevIns->Internal.s.pVMR3, NIL_PCIBDF, pMsi, uTagSrc); 306 306 } 307 307
Note:
See TracChangeset
for help on using the changeset viewer.