VirtualBox

Ignore:
Timestamp:
May 20, 2021 2:05:10 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144541
Message:

Intel IOMMU: bugref:9967 Add ring-3 MSI queuing for the IOMMU send MSI interface as well. Added a todo for later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/PDMR0DevHlp.cpp

    r89069 r89200  
    16261626
    16271627
    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 */
     1636static void pdmR0IoApicSendMsi(PPDMDEVINS pDevIns, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc)
     1637{
    16351638    PGVM pGVM = pDevIns->Internal.s.pGVM;
    16361639    if (pGVM->pdm.s.IoApic.pDevInsR0)
     
    16561659
    16571660
     1661/** @interface_method_impl{PDMPCIHLPR0,pfnIoApicSendMsi} */
     1662static 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
    16581672/** @interface_method_impl{PDMPCIHLPR0,pfnLock} */
    16591673static DECLCALLBACK(int) pdmR0PciHlp_Lock(PPDMDEVINS pDevIns, int rc)
     
    17311745
    17321746/** @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);
     1747static DECLCALLBACK(void) pdmR0IommuHlp_SendMsi(PPDMDEVINS pDevIns, PCMSIMSG pMsi, uint32_t uTagSrc)
     1748{
     1749    PDMDEV_ASSERT_DEVINS(pDevIns);
     1750    pdmR0IoApicSendMsi(pDevIns, NIL_PCIBDF, pMsi, uTagSrc);
    17461751}
    17471752
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette