// wdm.h
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;
View the official Windows Driver Kit DDI referenceNo description available.
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.
SizeThe size, in bytes, of this structure.
VersionThe driver-defined interface version.
ContextA pointer to interface-specific context information.
InterfaceReferenceA pointer to an InterfaceReference routine that increments the interface's reference count.
InterfaceDereferenceA pointer to an InterfaceDereference routine that decrements the interface's reference count.
SetVirtualFunctionDataA pointer to a SetVirtualFunctionData routine that writes data to the PCIe configuration space of an SR-IOV device's VF.
GetVirtualFunctionDataA pointer to a GetVirtualFunctionData routine that reads data from the PCIe configuration space of an SR-IOV device's VF.
GetLocationA 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.
GetResourcesA pointer to a GetResources routine that provides information about the resources that are available for virtualization on an SR-IOV device.
EnableVirtualizationA pointer to an EnableVirtualization routine that enables or disables virtualization on an SR-IOV device.
GetVirtualFunctionProbedBarsA 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.
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.