VirtualBox

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


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.

Location:
trunk/src/VBox/VMM
Files:
2 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
  • trunk/src/VBox/VMM/include/PDMInternal.h

    r84170 r84431  
    635635    DECLR3CALLBACKMEMBER(int,   pfnMemWrite,(PPDMDEVINS pDevIns, uint16_t uDevId, uint64_t uDva, size_t cbWrite,
    636636                                             PRTGCPHYS pGCPhysSpa));
     637    /** @copydoc PDMIOMMUREGR3::pfnMsiRemap */
     638    DECLR3CALLBACKMEMBER(int,   pfnMsiRemap,(PPDMDEVINS pDevIns, uint16_t uDevId, RTGCPHYS GCPhysIn, uint32_t uDataIn,
     639                                             PRTGCPHYS pGCPhysOut, uint32_t *puDataOut));
    637640} PDMIOMMU;
    638641
     
    655658    DECLR0CALLBACKMEMBER(int,   pfnMemWrite,(PPDMDEVINS pDevIns, uint16_t uDevId, uint64_t uDva, size_t cbWrite,
    656659                                             PRTGCPHYS pGCPhysSpa));
     660    /** @copydoc PDMIOMMUREGR3::pfnMsiRemap */
     661    DECLR0CALLBACKMEMBER(int,   pfnMsiRemap,(PPDMDEVINS pDevIns, uint16_t uDevId, RTGCPHYS GCPhysIn, uint32_t uDataIn,
     662                                             PRTGCPHYS pGCPhysOut, uint32_t *puDataOut));
    657663} PDMIOMMUR0;
    658664/** Pointer to a ring-0 IOMMU data. */
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