DXGKCB_SAVEMEMORYFORHOTUPDATE callback function (d3dkmddi.h)
A kernel-mode display miniport driver can call DXGKCB_SAVEMEMORYFORHOTUPDATE to save adapter memory to support driver hot update.
Syntax
DXGKCB_SAVEMEMORYFORHOTUPDATE DxgkcbSavememoryforhotupdate;
NTSTATUS DxgkcbSavememoryforhotupdate(
[in] IN_CONST_HANDLE hAdapter,
[in] IN_CONST_PDXGKARGCB_SAVEMEMORYFORHOTUPDATE pArgs
)
{...}
Parameters
[in] hAdapter
A handle to the DXGK adapter that is passed to DxgkDdiStartDevice.
[in] pArgs
A pointer to the DXGKARGCB_SAVEMEMORYFORHOTUPDATE structure that contains arguments for this callback.
Return value
DXGKCB_SAVEMEMORYFORHOTUPDATE returns STATUS_SUCCESS if the operation succeeds; otherwise it returns an error code from Ntstatus.h.
Remarks
Each call to DXGKCB_SAVEMEMORYFORHOTUPDATE saves a block of physical memory pages, as well as optionally metadata that the driver wants to associate with the memory block. When the pages are restored, the driver will get a separate call for each saved memory block together with metadata.
For convenience, the callback provides 3 options to save physical memory:
- As an array of contiguous physical memory ranges (pDataMemoryRanges)
- As an MDL (pDataMdl)
- As virtual memory buffer (pData)
One (and only one) of the pointers to data (pDataMemoryRanges, pDataMdl or pData) must be not NULL.
DXGKCB_XXX functions are implemented by Dxgkrnl. To use this callback function, set the appropriate members of DXGKARGCB_SAVEMEMORYFORHOTUPDATE and then call DxgkCbSaveMemoryForHotUpdate via the DXGKRNL_INTERFACE.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1903 (WDDM 2.6) |
Header | d3dkmddi.h |
IRQL | PASSIVE_LEVEL |