// d3dkmddi.h
DXGKCB_MAPMDLTOIOMMU DxgkcbMapmdltoiommu;
NTSTATUS DxgkcbMapmdltoiommu(
[in] IN_CONST_HANDLE hAdapter,
[in/out] INOUT_PDXGKARGCB_MAPMDLTOIOMMU pMapMdlToIoMmu
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
A kernel-mode display miniport driver calls DXGKCB_MAPMDLTOIOMMU to map a memory descriptor list (MDL) to the IOMMU so that the underlying memory can be accessed by the GPU.
hAdapter [in]A handle to a display adapter. The driver provides this handle for the master/lead device in the LDA chain.
pMapMdlToIoMmu [in/out]Pointer to a DXGKARGCB_MAPMDLTOIOMMU structure that contains a handle to the memory.
Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS Values error code.
DXGKCB_XXX functions are implemented by Dxgkrnl. To use this callback function, set the appropriate member of DXGKARGCB_MAPMDLTOIOMMU and then call DxgkCbMapMdlToIoMmu via the DXGKRNL_INTERFACE.
If the driver uses this callback, it is responsible for ensuring that the lifetime of the MDL exceeds the corresponding DXGKCB_UNMAPMDLFROMIOMMU call. Otherwise the DXGKCB_UNMAPMDLFROMIOMMU call has undefined behavior and may lead to compromised security of the pages from the MDL. The pages could get repurposed by Mm by the time they are unmapped.
See IOMMU-based GPU isolation for more information.