The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


The WriteVfConfigBlock routine writes a block of configuration data for a PCI Express virtual function (VF). This routine is called by the driver of a PCIe VF on a device that supports the single root I/O virtualization (SR-IOV) interface.



NTSTATUS ReadVfConfigBlock(
  _In_ PVOID Context,
  _In_ ULONG BlockId,
  _In_ PVOID Buffer,
  _In_ ULONG Length
{ ... }


Context [in]

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

BlockId [in]

The identifier of the VF configuration block to be written. This identifier is proprietary to the independent hardware vendor (IHV) and is used only by the drivers for the PCIe physical function (PF) and VF on the device.

Buffer [in]

A pointer to a caller-allocated buffer that contains the configuration data to be written. For more information, see Remarks.

Length [in]

The number of bytes to be written to the VF configuration block.

Note  The value of this parameter must not exceed VPCI_MAX_READ_WRITE_BLOCK_SIZE.

Return value

The ReadVfConfigBlock routine returns STATUS_SUCCESS if the operation succeeds. Otherwise, the routine returns an appropriate NTSTATUS value.


When the WriteVfConfigBlock routine is called, the driver of the PF is notified to update a specified VF configuration block with the specified data.

A VF configuration block is used for backchannel communication between the drivers of the PCIe PF and a VF on a device that supports the SR-IOV interface. The IHV can define one or more VF configuration blocks for the device. Each VF configuration block has an IHV-defined format, length, and block ID.

VF configuration data can be exchanged between the following drivers in a protected manner:

  • The VF driver, which runs in the guest operating system. This operating system runs within a Hyper-V child partition.

  • The PF driver, which runs in the management operating system. This operating system runs within the Hyper-V parent partition.

Data from each VF configuration block is used only by the drivers of the PF and VF.

Note  The IOCTL_VPCI_WRITE_BLOCK IOCTL offers an asynchronous alternative to the WriteVfConfigBlock routine.


Target platform



Supported in Windows Server 2012 and later versions of Windows.


Vpci.h (include Wdm.h or Pcivirt.h)



See also




Send comments about this topic to Microsoft