SRIOV_GET_DEVICE_LOCATION callback function (pcivirt.h)

Retrieves information about the current location of the PCI device on the bus, such as PCI Segment, Bus, Device and Function number.

Syntax

SRIOV_GET_DEVICE_LOCATION SriovGetDeviceLocation;

void SriovGetDeviceLocation(
  [in]  PVOID Context,
  [in]  USHORT VfIndex,
  [out] PUINT16 SegmentNumber,
  [out] PUINT8 BusNumber,
  [out] PUINT8 FunctionNumber
)
{...}

Parameters

[in] Context

A pointer to a driver-defined context.

[in] VfIndex

A zero-based index of the VF to which this read operation applies.

[out] SegmentNumber

A pointer to a variable that is filled in with the current Segment Number, which describes the group of PCI Buses to which this device is attached.

[out] BusNumber

A pointer to a variable that is filled in with the current Bus Number, which describes which PCI Bus to which this device is attached.

[out] FunctionNumber

A pointer to a variable that is filled in with the FunctionNumber, which further describes where on this bus the device can be found.

Return value

None

Remarks

This callback function is implemented by the physical function (PF) driver. It is invoked when the system wants to retrieve the device location.

The PF driver registers its implementation by setting the GetDeviceLocation member of the SRIOV_DEVICE_INTERFACE_STANDARD, configuring a WDF_QUERY_INTERFACE_CONFIG structure, and calling WdfDeviceAddQueryInterface.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Header pcivirt.h
IRQL PASSIVE_LEVEL