From 621a20e08155179b1902c428361e80f41429f50d Mon Sep 17 00:00:00 2001 From: Pankaj Gupta Date: Wed, 15 Jul 2015 17:46:47 +0530 Subject: 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 Reviewed-by: Amit Shah Message-Id: <1436962608-9961-2-git-send-email-pagupta@redhat.com> [Re-worded patch subject, removed extra whitespace -- Amit] Signed-off-by: Amit Shah --- include/hw/virtio/virtio-rng.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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 -- cgit v1.2.3-55-g7522