IOCTL_SRIOV_PROXY_QUERY_LUID - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// 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 reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-pcivirt-ioctl_sriov_proxy_query_luid)

IOCTL_SRIOV_PROXY_QUERY_LUID IOCTL

Major Code

IRP_MJ_DEVICE_CONTROL

Description

This request supplies the local unique identifier of the SR_IOV device implementing the interface.

Parameters

Major code

IRP_MJ_DEVICE_CONTROL

Input buffer

NULL. No input buffer is required for this operation.

Input buffer length

Zero.

Output buffer

A pointer to a SRIOV_PROXY_QUERY_LUID_OUTPUT structure that is filled with the identifier.

Output buffer length

The size of the SRIOV_PROXY_QUERY_LUID_OUTPUT structure

Input/output buffer

Not used with this operation; set this parameter to NULL.

Input/output buffer length

Not used with this operation; set this parameter to zero.

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful. Otherwise, Status to the appropriate error condition as a NTSTATUS code.

Remarks

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;

See also