/* This function checks if a handle corresponds to the Virtio Device ID given at the VIRTIO_DEVICE_PROTOCOL level.  */
STATIC BOOLEAN EFIAPI IsVirtio(IN EFI_HANDLE Handle, IN CONST CHAR16 *ReportText, IN UINT16 VirtIoDeviceId)
/* This function checks if a handle corresponds to the Virtio Device ID given at the VIRTIO_DEVICE_PROTOCOL level.  */
STATIC BOOLEAN EFIAPI IsVirtio(IN EFI_HANDLE Handle, IN CONST CHAR16 *ReportText, IN UINT16 VirtIoDeviceId)
{
  EFI_STATUS              Status;
  VIRTIO_DEVICE_PROTOCOL  *VirtIo;
  Status = gBS->HandleProtocol (
                  Handle,
                  &gVirtioDeviceProtocolGuid,
                  (VOID **)&VirtIo
                  );
  if (EFI_ERROR (Status)) {
    return FALSE;
  }
  return (BOOLEAN)(VirtIo->SubSystemDeviceId ==
                   VirtIoDeviceId);
}