Bewerken

Delen via


PCI_VIRTUALIZATION_INTERFACE structure (wdm.h)

The PCI_VIRTUALIZATION_INTERFACE structure enables drivers to manage and configure the PCI Express (PCIe) configuration space for a virtual function (VF). VFs are exposed on the PCI bus by devices that support the single root I/O virtualization (SR-IOV) interface.

This structure describes the GUID_PCI_VIRTUALIZATION_INTERFACE interface.

Syntax

typedef struct _PCI_VIRTUALIZATION_INTERFACE {
  USHORT                            Size;
  USHORT                            Version;
  PVOID                             Context;
  PINTERFACE_REFERENCE              InterfaceReference;
  PINTERFACE_DEREFERENCE            InterfaceDereference;
  PSET_VIRTUAL_DEVICE_DATA          SetVirtualFunctionData;
  PGET_VIRTUAL_DEVICE_DATA          GetVirtualFunctionData;
  PGET_VIRTUAL_DEVICE_LOCATION      GetLocation;
  PGET_VIRTUAL_DEVICE_RESOURCES     GetResources;
  PENABLE_VIRTUALIZATION            EnableVirtualization;
  PGET_VIRTUAL_FUNCTION_PROBED_BARS GetVirtualFunctionProbedBars;
} PCI_VIRTUALIZATION_INTERFACE, *PPCI_VIRTUALIZATION_INTERFACE;

Members

Size

The size, in bytes, of this structure.

Version

The driver-defined interface version.

Context

A pointer to interface-specific context information.

InterfaceReference

A pointer to an InterfaceReference routine that increments the interface's reference count.

InterfaceDereference

A pointer to an InterfaceDereference routine that decrements the interface's reference count.

SetVirtualFunctionData

A pointer to a SetVirtualFunctionData routine that writes data to the PCIe configuration space of an SR-IOV device's VF.

GetVirtualFunctionData

A pointer to a GetVirtualFunctionData routine that reads data from the PCIe configuration space of an SR-IOV device's VF.

GetLocation

A pointer to a GetLocation routine that provides information about the current device location of a VF in the PCIe hierarchy. This information is necessary for a virtualization system that is using an I/O memory management unit (IOMMU) to route traffic to or from the device.

GetResources

A pointer to a GetResources routine that provides information about the resources that are available for virtualization on an SR-IOV device.

EnableVirtualization

A pointer to an EnableVirtualization routine that enables or disables virtualization on an SR-IOV device.

GetVirtualFunctionProbedBars

A pointer to a GetVirtualFunctionProbedBars routine that allows a non-privileged Hyper-V virtual machine (VM) to determine what would be read from the PCIe Base Address Registers (BARs) of a VF after a query by the PCI bus driver. The PCI driver performs this query to determine the memory or I/O address space that the device requires.

Remarks

For devices that support the SR-IOV interface, drivers occasionally have to access and manage the PCIe configuration space of the device's VFs. Drivers call routines from the GUID_PCI_VIRTUALIZATION_INTERFACE interface to access the PCIe configuration space of the VFs on the device.

Since a device's VFs do not appear as complete PCIe devices on the PCI bus, the GUID_BUS_INTERFACE_STANDARD interface cannot be used for the management of a VF.

The PCI_VIRTUALIZATION_INTERFACE structure is an extension of the INTERFACE structure.

A driver obtains a pointer to the PCI_VIRTUALIZATION_INTERFACE structure by sending an IRP_MN_QUERY_INTERFACE I/O request packet (IRP) to its bus driver with InterfaceType set to GUID_PCI_VIRTUALIZATION_INTERFACE.

Requirements

Requirement Value
Minimum supported server Windows Server 2012
Header wdm.h (include Wdm.h)

See also

GUID_BUS_INTERFACE_STANDARD

InterfaceDereference

InterfaceReference

IRP_MN_QUERY_INTERFACE