/* This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG device at the VIRTIO_DEVICE_PROTOCOL level.  */
STATIC BOOLEAN EFIAPI IsVirtioRng(IN EFI_HANDLE Handle, IN CONST CHAR16 *ReportText)
/* This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG device at the VIRTIO_DEVICE_PROTOCOL level.  */
STATIC BOOLEAN EFIAPI IsVirtioRng(IN EFI_HANDLE Handle, IN CONST CHAR16 *ReportText)
{
  EFI_STATUS              Status;
  VIRTIO_DEVICE_PROTOCOL  *VirtIo;
  Status = gBS->HandleProtocol (
                  Handle,
                  &gVirtioDeviceProtocolGuid,
                  (VOID **)&VirtIo
                  );
  if (EFI_ERROR (Status)) {
    return FALSE;
  }
  return (BOOLEAN)(VirtIo->SubSystemDeviceId ==
                   VIRTIO_SUBSYSTEM_ENTROPY_SOURCE);
}