GET_VIRTUAL_DEVICE_DATA callback function (wdm.h)

The GetVirtualFunctionData routine reads data from the PCI Express (PCIe) configuration space of a virtual function (VF) on a device that supports the single root I/O virtualization (SR-IOV) interface.

Syntax

GET_VIRTUAL_DEVICE_DATA GetVirtualDeviceData;

ULONG GetVirtualDeviceData(
  [in, out] PVOID Context,
  [in]      USHORT VirtualFunction,
  [out]     PVOID Buffer,
  [in]      ULONG Offset,
  [in]      ULONG Length
)
{...}

Parameters

[in, out] Context

A pointer to interface-specific context information. The caller passes the value that is passed as the Context member of the PCI_VIRTUALIZATION_INTERFACE structure for the interface.

[in] VirtualFunction

A zero-based value that specifies the VF on the device from which data is to be read.

[out] Buffer

A pointer to the buffer that contains the configuration information read from the PCIe configuration space of the VF.

[in] Offset

The offset into the PCIe configuration space data of the VF. This member specifies where this read operation begins.

[in] Length

The length, in bytes, of the data to be read.

Return value

The GetVirtualFunctionData routine returns the length, in bytes, of the PCIe configuration data that was read after a successful read operation. If the read operation is unsuccessful, the routine returns zero.

Remarks

The GetVirtualFunctionData routine resembles the GetBusData routine, except that it reads PCIe configuration data from a VF instead of from a device's physical function (PF).

The GetVirtualFunctionData routine is provided by the GUID_PCI_VIRTUALIZATION_INTERFACE interface. The GetBusData routine is provided by the GUID_BUS_INTERFACE_STANDARD interface.

The virtualization stack calls GetVirtualFunctionData when a driver that is running in the guest operating system calls the GetBusData routine.

Requirements

Requirement Value
Minimum supported client Supported in Windows Server 2012 and later versions of Windows.
Target Platform Desktop
Header wdm.h (include Wdm.h)
IRQL IRQL <= APC_LEVEL

See also

PCI_VIRTUALIZATION_INTERFACE

GetBusData