DXGKARG_RESTOREMEMORYFORHOTUPDATE structure (d3dkmddi.h)

Arguments used to restore memory for driver hot update.

Syntax

typedef struct _DXGKARG_RESTOREMEMORYFORHOTUPDATE {
  [in] DXGK_RESTOREMEMORYFORHOTUPDATEFLAGS Flags;
  [in] PMDL                                pDataMdl;
  [in] UINT                                MetaDataSize;
  [in] PVOID                               pMetaData;
} DXGKARG_RESTOREMEMORYFORHOTUPDATE;

Members

[in] Flags

A DXGK_RESTOREMEMORYFORHOTUPDATEFLAGS structure. When the flag is set, all other input data is set to NULL. The driver can delete all memory, allocated during restore operation.

[in] pDataMdl

The MDL (memory descriptor list), which describes the memory pages to restore.

If the driver returns STATUS_SUCCESS from this function, the driver assumes the ownership of the MDL. The driver can keep the pointer to the MDL until it is no longer used. After that the driver must free the MDL pages and the MDL itself by calling MmFreePagesFromMdl(pDataMdl) and ExFreePool(pDataMdl).

The driver can use MmMapLockedPagesSpecifyCache or MmGetSystemAddressForMdlSafe to get a CPU pointer to the buffer.

Here is an example of how you would get a CPU pointer to the buffer:

pBuffer = MmMapLockedPagesSpecifyCache(
    pMdl,
    KernelMode,
    MmCached,
    NULL,
    FALSE,
    NormalPagePriority | MdlMappingNoExecute);

pBuffer = MmGetSystemAddressForMdlSafe(pMdl, NormalPagePriority | MdlMappingNoExecute);

[in] MetaDataSize

The number of bytes in the buffer that pMetaData points to.

[in] pMetaData

A virtual memory pointer to the metadata that is associated with the memory block.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1903
Header d3dkmddi.h