// pcivirt.h
SRIOV_QUERY_LUID SriovQueryLuid;
NTSTATUS SriovQueryLuid(
[in] PVOID Context,
[out] PLUID Luid
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
Gets the local unique identifier of the SR-IOV device.
Context [in]A pointer to a driver-defined context.
Luid [out]A pointer to the local unique identifier of the SR_IOV device implementing the interface.
Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.
SRIOV_QUERY_LUID SriovQueryLuid;
NTSTATUS SriovQueryLuid(
_In_ PVOID Context,
_Out_ PLUID Luid
)
{ ... }
typedef SRIOV_QUERY_LUID *PSRIOV_QUERY_LUID;
This callback function is implemented by the physical function (PF) driver. It is invoked when the system wants to get the identifier of a specific virtual function.
The PF driver registers its implementation by setting the QueryLuid member of the SRIOV_DEVICE_INTERFACE_STANDARD, configuring a WDF_QUERY_INTERFACE_CONFIG structure, and calling WdfDeviceAddQueryInterface.
Here is an example implementation of this callback function. The PF driver generates a unique identifier by calling ZwAllocateLocallyUniqueId and stores it in the device context.
NTSTATUS
Virtualization_QueryLuid (
_In_ PVOID Context,
_Out_ PLUID Luid
)
{
PDEVICE_CONTEXT deviceContext;
PAGED_CODE();
deviceContext = (PDEVICE_CONTEXT)Context;
*Luid = deviceContext->Luid;
return STATUS_SUCCESS;
}