SRIOV_QUERY_PROBED_BARS_2 callback function (pcivirt.h)
Queries the data read from the specified PCI Express SR-IOV Virtual Function (VF) base address registers (BARs) if the value -1 were written to them first.
Syntax
SRIOV_QUERY_PROBED_BARS_2 SriovQueryProbedBars2;
NTSTATUS SriovQueryProbedBars2(
[in] PVOID Context,
[in] USHORT VfIndex,
[out] PULONG BaseRegisterValues
)
{...}
Parameters
[in] Context
A pointer to a driver-defined context.
[in] VfIndex
A zero-based index of the VF that is being queried.
[out] BaseRegisterValues
A pointer to an array of variables that is bounded by the number of BARs in a PCI device.
Return value
Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.
Remarks
This callback function is implemented by the physical function (PF) driver. It is invoked when the system wants to read from the specified virtual function's (VF) base address registers.
The PF driver registers its implementation by setting the QueryProbedBars_2 member of the SRIOV_DEVICE_INTERFACE_STANDARD_2, configuring a WDF_QUERY_INTERFACE_CONFIG structure, and calling WdfDeviceAddQueryInterface.
This callback is invoked by the virtualization stack (non-privileged) when it wants to find out the VF’s base address register values after the registers are written with the value (-1). This process is conventional when setting up a PCI device, and the result allows the PCI driver to know the amount of address space that would be decoded by the device after it is enabled. When a non-privileged VM writes to the VF’s BARs, the privileged VM can stop functioning. Therefore, this routine requires the need for writing to the BARs.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 |
Minimum supported server | Windows Server 2016 |
Target Platform | Windows |
Header | pcivirt.h |
IRQL | PASSIVE_LEVEL |