mirror of
https://git.proxmox.com/git/qemu
synced 2025-06-24 10:08:30 +00:00

The Linux kernel already has a virtio-rng driver, this is the device implementation. When the guest asks for entropy from the virtio hwrng, it puts a buffer in the vq. We then put entropy into that buffer, and push it back to the guest. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- aliguori: converted to new RngBackend interface aliguori: remove entropy needed event aliguori: fix migration
25 lines
483 B
C
25 lines
483 B
C
/*
|
|
* Virtio RNG Support
|
|
*
|
|
* Copyright Red Hat, Inc. 2012
|
|
* Copyright Amit Shah <amit.shah@redhat.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or
|
|
* (at your option) any later version. See the COPYING file in the
|
|
* top-level directory.
|
|
*/
|
|
|
|
#ifndef _QEMU_VIRTIO_RNG_H
|
|
#define _QEMU_VIRTIO_RNG_H
|
|
|
|
#include "qemu/rng.h"
|
|
|
|
/* The Virtio ID for the virtio rng device */
|
|
#define VIRTIO_ID_RNG 4
|
|
|
|
struct VirtIORNGConf {
|
|
RngBackend *rng;
|
|
};
|
|
|
|
#endif
|