Bewerken

Delen via


DXGKCB_MAPMDLTOIOMMU callback function (d3dkmddi.h)

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.

Syntax

DXGKCB_MAPMDLTOIOMMU DxgkcbMapmdltoiommu;

NTSTATUS DxgkcbMapmdltoiommu(
  [in]     IN_CONST_HANDLE hAdapter,
  [in/out] INOUT_PDXGKARGCB_MAPMDLTOIOMMU pMapMdlToIoMmu
)
{...}

Parameters

[in] hAdapter

A handle to a display adapter. The driver provides this handle for the master/lead device in the LDA chain.

[in/out] pMapMdlToIoMmu

Pointer to a DXGKARGCB_MAPMDLTOIOMMU structure that contains a handle to the memory.

Return value

Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS Values error code.

Remarks

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.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1803 (WDDM 2.4)
Header d3dkmddi.h
IRQL PASSIVE_LEVEL

See also

DXGKARGCB_MAPMDLTOIOMMU

DXGKCB_UNMAPMDLFROMIOMMU

DXGKRNL_INTERFACE