VirtualBox

Changeset 84859 in vbox


Ignore:
Timestamp:
Jun 17, 2020 9:12:19 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138678
Message:

AMD IOMMU: bugref:9654 DevIoApic: Remap MSIs via the IOMMU before calling into the APIC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevIoApic.cpp

    r84826 r84859  
    865865    XAPICINTR ApicIntr;
    866866    RT_ZERO(ApicIntr);
     867
     868#ifdef VBOX_WITH_IOMMU_AMD
     869    /*
     870     * The MSI may need to be remapped (or discarded) if an IOMMU is present.
     871     */
     872    MSIMSG MsiOut;
     873    Assert(PCIBDF_IS_VALID(uBusDevFn));
     874    int rcRemap = pThisCC->pIoApicHlp->pfnIommuMsiRemap(pDevIns, uBusDevFn, pMsi, &MsiOut);
     875    if (RT_SUCCESS(rcRemap))
     876        ioapicGetApicIntrFromMsi(&MsiOut, &ApicIntr);
     877    else
     878    {
     879        if (rcRemap == VERR_IOMMU_INTR_REMAP_DENIED)
     880            Log3(("IOAPIC: MSI (Addr=%#RX64 Data=%#RX32) remapping denied. rc=%Rrc", pMsi->Addr.u64, pMsi->Data.u32, rcRemap));
     881        else
     882            Log(("IOAPIC: MSI (Addr=%#RX64 Data=%#RX32) remapping failed. rc=%Rrc", pMsi->Addr.u64, pMsi->Data.u32, rcRemap));
     883        return;
     884    }
     885#else
    867886    ioapicGetApicIntrFromMsi(pMsi, &ApicIntr);
    868 
    869     /** @todo IOMMU: Call into the IOMMU to remap the MSI. uBusDevFn will be used
    870      *        then. */
    871     NOREF(uBusDevFn);
     887#endif
    872888
    873889    /*
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