SRIOV_QUERY_LUID callback function (pcivirt.h)

Gets the local unique identifier of the SR-IOV device.

Syntax

SRIOV_QUERY_LUID SriovQueryLuid;

NTSTATUS SriovQueryLuid(
  [in]  PVOID Context,
  [out] PLUID Luid
)
{...}

Parameters

[in] Context

A pointer to a driver-defined context.

[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, 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
IRQL PASSIVE_LEVEL