SRIOV_QUERY_LUID - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// pcivirt.h

SRIOV_QUERY_LUID SriovQueryLuid;

NTSTATUS SriovQueryLuid(
  [in]  PVOID Context,
  [out] PLUID Luid
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-pcivirt-sriov_query_luid)

SRIOV_QUERY_LUID callback

Description

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

Parameters

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 value

Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.

Prototype

SRIOV_QUERY_LUID SriovQueryLuid;

NTSTATUS SriovQueryLuid(
  _In_  PVOID Context,
  _Out_ PLUID Luid
)
{ ... }

typedef SRIOV_QUERY_LUID *PSRIOV_QUERY_LUID;

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;
}