SRIOV_QUERY_VF_LUID callback function (pcivirt.h)
Gets the local unique identifier of the PCI Express SR-IOV Virtual Function (VF).
Syntax
SRIOV_QUERY_VF_LUID SriovQueryVfLuid;
NTSTATUS SriovQueryVfLuid(
[in] PVOID Context,
[in] USHORT VfIndex,
[out] PLUID Luid
)
{...}
Parameters
[in] Context
A pointer to a driver-defined context.
[in] VfIndex
A zero-based index of the VF that is being queried.
[out] Luid
A pointer to the local unique identifier of the SR_IOV device implementing the interface.
Return value
Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.
Remarks
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_2, 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;
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 |
Minimum supported server | Windows Server 2016 |
Target Platform | Windows |
Header | pcivirt.h |