summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPankaj Gupta2015-07-15 14:16:47 +0200
committerAmit Shah2015-07-17 15:35:16 +0200
commit621a20e08155179b1902c428361e80f41429f50d (patch)
treec9871f619742c9ec55f9ed6ab68a2b05ca2cc772 /include
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20150717-1' into s... (diff)
downloadqemu-621a20e08155179b1902c428361e80f41429f50d.tar.gz
qemu-621a20e08155179b1902c428361e80f41429f50d.tar.xz
qemu-621a20e08155179b1902c428361e80f41429f50d.zip
virtio-rng: trigger timer only when guest requests for entropy
This patch triggers timer only when guest requests for entropy. As soon as first request from guest for entropy comes we set the timer. Timer bumps up the quota value when it gets triggered. Signed-off-by: Pankaj Gupta <pagupta@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Message-Id: <1436962608-9961-2-git-send-email-pagupta@redhat.com> [Re-worded patch subject, removed extra whitespace -- Amit] Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-rng.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h
index 0316488733..3f07de70c7 100644
--- a/include/hw/virtio/virtio-rng.h
+++ b/include/hw/virtio/virtio-rng.h
@@ -44,6 +44,7 @@ typedef struct VirtIORNG {
*/
QEMUTimer *rate_limit_timer;
int64_t quota_remaining;
+ bool activate_timer;
} VirtIORNG;
#endif