DXGKCB_RESERVEGPUVIRTUALADDRESSRANGE callback function

DxgkCbReserveGpuVirtualAddressRange allows the kernel mode driver to reserve a graphics processing unit (GPU) virtual address range during creation of a process. Reserving the GPU virtual address range is only possible during process creation (i.e. within the call to DxgkDdiCreateProcess) and is invalid at any other time.

Reservation is possible on both regular process as well as the system process where the system device and context lives.

The first entry in the root page table (page table entry index 0) will always be initialized as invalid by the video memory manager and the driver reservations will start from page table entry index 1. Driver reservation must always be an exact multiple of virtual address space, covered by leaf page table, as the specific page table entry can’t be shared between the video memory manager and the kernel mode driver. Page table entries reserved by the driver will be initialized as invalid by the video memory manager and may be overwritten by the driver to reference an internally allocated page table managed by the driver. The video memory manager will update the reserved page table entries as invalid every time the corresponding page table becomes resident.

Syntax

DXGKCB_RESERVEGPUVIRTUALADDRESSRANGE DxgkcbReservegpuvirtualaddressrange;

NTSTATUS DxgkcbReservegpuvirtualaddressrange(
  IN_CONST_HANDLE hAdapter,
  INOUT_PDXGKARGCB_RESERVEGPUVIRTUALADDRESSRANGE pArgs
)
{...}

Parameters

hAdapter

A handle to the display adapter.

pArgs

The DXGKARGCB_RESERVEGPUVIRTUALADDRESSRANGE structure that describes the operation.

Return Value

Returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes defined in Ntstatus.h.

Requirements

   
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Desktop
Header d3dkmddi.h (include Dispmprt.h)

See Also

DXGKARGCB_RESERVEGPUVIRTUALADDRESSRANGE

DxgkDdiCreateProcess