VirtualBox

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


Ignore:
Timestamp:
May 21, 2020 8:42:19 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138135
Message:

AMD IOMMU: bugref:9654 IOMMU interrupt remapping callback skeleton.

File:
1 edited

Legend:

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

    r84332 r84431  
    33483348                    ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIommuReg->u32Version, PDM_IOMMUREGR3_VERSION),
    33493349                    VERR_INVALID_PARAMETER);
    3350     /** @todo IOMMU: Validate other parameters, see also tstDevicePdmDevHlp.cpp. */
     3350    AssertPtrReturn(pIommuReg->pfnMemRead, VERR_INVALID_POINTER);
     3351    AssertPtrReturn(pIommuReg->pfnMemWrite, VERR_INVALID_POINTER);
     3352    AssertPtrReturn(pIommuReg->pfnMsiRemap, VERR_INVALID_POINTER);
    33513353    AssertMsgReturn(pIommuReg->u32TheEnd == PDM_IOMMUREGR3_VERSION,
    33523354                    ("%s/%d: u32TheEnd=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIommuReg->u32TheEnd, PDM_IOMMUREGR3_VERSION),
     
    33623364     */
    33633365    unsigned idxIommu = 0;
     3366#if 0
    33643367    for (idxIommu = 0; idxIommu < RT_ELEMENTS(pVM->pdm.s.aIommus); idxIommu++)
    33653368        if (!pVM->pdm.s.aIommus[idxIommu].pDevInsR3)
     
    33683371                          ("Too many IOMMUs. Max=%u\n", RT_ELEMENTS(pVM->pdm.s.aIommus)),
    33693372                          VERR_OUT_OF_RESOURCES);
     3373#else
     3374    /* Currently we support only a single IOMMU. */
     3375    AssertMsgReturn(!pVM->pdm.s.aIommus[0].pDevInsR3,
     3376                    ("%s/%u: Only one IOMMU device is supported!\n", pDevIns->pReg->szName, pDevIns->iInstance),
     3377                    VERR_ALREADY_EXISTS);
     3378#endif
    33703379    PPDMIOMMU pIommu = &pVM->pdm.s.aIommus[idxIommu];
    33713380
     
    33773386    pIommu->pfnMemRead  = pIommuReg->pfnMemRead;
    33783387    pIommu->pfnMemWrite = pIommuReg->pfnMemWrite;
     3388    pIommu->pfnMsiRemap = pIommuReg->pfnMsiRemap;
    33793389    Log(("PDM: Registered IOMMU device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns));
    33803390
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