DXGKDDI_BEGINEXCLUSIVEACCESS - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// d3dkmddi.h

DXGKDDI_BEGINEXCLUSIVEACCESS DxgkddiBeginexclusiveaccess;

NTSTATUS DxgkddiBeginexclusiveaccess(
  IN_CONST_HANDLE hAdapter,
  IN_PDXGKARG_BEGINEXCLUSIVEACCESS pBeginExclusiveAccess
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-d3dkmddi-dxgkddi_beginexclusiveaccess)

DXGKDDI_BEGINEXCLUSIVEACCESS callback function

Description

Dxgkrnl calls DxgkDdiBeginExclusiveAccess to notify the kernel-mode driver that an IOMMU domain switch is about to occur.

Parameters

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.

Return value

DxgkDdiBeginExclusiveAccess should return STATUS_SUCCESS if the operation succeeds. Otherwise, it should return an appropriate NTSTATUS error code.

Remarks

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.

See also

DRIVER_INITIALIZATION_DATA

DXGKARG_BEGINEXCLUSIVEACCESS

DxgkDdiEndExclusiveAccess