// d3dkmddi.h
DXGKDDI_BEGINEXCLUSIVEACCESS DxgkddiBeginexclusiveaccess;
NTSTATUS DxgkddiBeginexclusiveaccess(
IN_CONST_HANDLE hAdapter,
IN_PDXGKARG_BEGINEXCLUSIVEACCESS pBeginExclusiveAccess
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
Dxgkrnl calls DxgkDdiBeginExclusiveAccess to notify the kernel-mode driver that an IOMMU domain switch is about to occur.
hAdapter[in] A handle to a context block that is associated with a display adapter.
pBeginExclusiveAccess[in] Pointer to a DXGKARG_BEGINEXCLUSIVEACCESS structure that contains the input arguments for DxgkDdiBeginExclusiveAccess.
DxgkDdiBeginExclusiveAccess should return STATUS_SUCCESS if the operation succeeds. Otherwise, it should return an appropriate NTSTATUS error code.
IOMMU domain attach and detach is extremely fast, but is nonetheless not currently atomic. This means that a transaction issued over PCIe isn't guaranteed to be translated correctly while swapping to a domain with different mappings.
To handle this situation, Dxgkrnl calls the following KMD DDI pair:
The driver must ensure that its hardware is silent whenever the device is switched to a new IOMMU domain. That is, the driver must ensure that it doesn't read or write to system memory from the device between these two calls.
Between these two calls, Dxgkrnl guarantees the following:
As part of these calls, the driver may choose to disable and suppress interrupts (including vsync interrupts) for the duration of the exclusive access, even without explicit notification from the OS.