// pcivirt.h
// CTL_CODE(0x0022, 0x819, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_SRIOV_PROXY_QUERY_LUID 0x00226064
View the official Windows Driver Kit DDI referenceNo description available.
This request supplies the local unique identifier of the SR_IOV device implementing the interface.
NULL. No input buffer is required for this operation.
Zero.
A pointer to a SRIOV_PROXY_QUERY_LUID_OUTPUT structure that is filled with the identifier.
The size of the SRIOV_PROXY_QUERY_LUID_OUTPUT structure
Not used with this operation; set this parameter to NULL.
Not used with this operation; set this parameter to zero.
Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful. Otherwise, Status to the appropriate error condition as a NTSTATUS code.
This IOCTL request is sent by the virtualization stack to the PCI Express SR-IOV Physical Function (PF) driver that exposes GUID_DEVINTERFACE_VIRTUALIZABLE_DEVICE.
This IOCTL request originates in the user mode and is handled by the physical function (PF) driver in order to supply the local unique identifier of the physical device. This request is only required for SR-IOV devices doing direct assignment.
Before sending this request, the user mode application must obtain a handle to the PCI Express SR-IOV device by querying for GUID_DEVINTERFACE_VIRTUALIZABLE_DEVICE.
In this example, the PF driver generates a unique identifier by calling ZwAllocateLocallyUniqueId and stores it in the device context.
case IOCTL_SRIOV_PROXY_QUERY_LUID:
status = WdfRequestRetrieveOutputBuffer(Request,
sizeof(LUID),
&luid,
NULL);
if (!NT_SUCCESS(status))
{
break;
}
RtlCopyMemory(luid, &deviceContext->Luid, sizeof(LUID));
WdfRequestSetInformation(Request, sizeof(LUID));
status = STATUS_SUCCESS;
break;