// vpci.h
VPCI_WRITE_BLOCK VpciWriteBlock;
NTSTATUS VpciWriteBlock(
PVOID Context,
ULONG BlockId,
PVOID Buffer,
ULONG Length
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
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.
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.
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:
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.