SRIOV_QUERY_VF_LUID - NtDoc

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

SRIOV_QUERY_VF_LUID SriovQueryVfLuid;

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

NtDoc

No description available.

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

SRIOV_QUERY_VF_LUID callback

Description

Gets the local unique identifier of the PCI Express SR-IOV Virtual Function (VF).

Parameters

Context [in]

A pointer to a driver-defined context.

VfIndex [in]

A zero-based index of the VF that is being queried.

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_VF_LUID SriovQueryVfLuid;

NTSTATUS SriovQueryVfLuid(
  _In_  PVOID  Context,
  _In_  USHORT VfIndex,
  _Out_ PLUID  Luid
)
{ ... }

typedef SRIOV_QUERY_VF_LUID *PSRIOV_QUERY_VF_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_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;
}