4 * Copyright Red Hat, Inc. 2012
5 * Copyright Amit Shah <amit.shah@redhat.com>
7 * This work is licensed under the terms of the GNU GPL, version 2 or
8 * (at your option) any later version. See the COPYING file in the
12 #ifndef _QEMU_VIRTIO_RNG_H
13 #define _QEMU_VIRTIO_RNG_H
16 #include "qemu/rng-random.h"
18 /* The Virtio ID for the virtio rng device */
19 #define VIRTIO_ID_RNG 4
21 struct VirtIORNGConf
{
25 RndRandom
*default_backend
;
28 typedef struct VirtIORNG
{
33 /* Only one vq - guest puts buffer(s) on it when it needs entropy */
40 /* We purposefully don't migrate this state. The quota will reset on the
41 * destination as a result. Rate limiting is host state, not guest state.
43 QEMUTimer
*rate_limit_timer
;
44 int64_t quota_remaining
;