VirtualBox

Changeset 85007 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Jun 30, 2020 5:19:25 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138905
Message:

AMD IOMMU: bugref:9654 PDM, Main: Changes for southbridge I/O APIC and related PCI address assignment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r84854 r85007  
    3636#include <VBox/version.h>
    3737#include <VBox/log.h>
     38#include <VBox/pci.h>
    3839#include <VBox/err.h>
    3940#include <iprt/asm.h>
     
    14571458                            rc);
    14581459
     1460#ifdef VBOX_WITH_IOMMU_AMD
     1461        /** @todo IOMMU: Restrict this to the AMD flavor of IOMMU only at runtime. */
     1462        PPDMIOMMU  pIommu       = &pVM->pdm.s.aIommus[0];
     1463        PPDMDEVINS pDevInsIommu = pIommu->CTX_SUFF(pDevIns);
     1464        if (pDevInsIommu)
     1465        {
     1466            /*
     1467             * If the PCI device/function number has been explicitly specified via CFGM,
     1468             * ensure it's not the BDF reserved for the southbridge I/O APIC expected
     1469             * by linux guests when using an AMD IOMMU, see @bugref{9654#c23}.
     1470             */
     1471            uint16_t const uDevFn    = VBOX_PCI_DEVFN_MAKE(uPciDevNo, uPciFunNo);
     1472            uint16_t const uBusDevFn = PCIBDF_MAKE(u8Bus, uDevFn);
     1473            if (uBusDevFn == VBOX_PCI_BDF_SB_IOAPIC)
     1474            {
     1475                LogRel(("Configuration error: PCI BDF (%u:%u:%u) conflicts with SB I/O APIC (%s/%d/%d)\n", u8Bus,
     1476                        uCfgDevice, uCfgFunction, pDevIns->pReg->szName, pDevIns->iInstance, pPciDev->Int.s.idxSubDev));
     1477                return VERR_NOT_AVAILABLE;
     1478            }
     1479        }
     1480#endif
    14591481
    14601482        /*
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