diff options
author | Pankaj Gupta <pagupta@redhat.com> | 2015-07-15 17:46:47 +0530 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2015-07-17 19:05:16 +0530 |
commit | 621a20e08155179b1902c428361e80f41429f50d (patch) | |
tree | c9871f619742c9ec55f9ed6ab68a2b05ca2cc772 /include | |
parent | 5b5e8cdd7da7a2214dd062afff5b866234aab228 (diff) | |
download | 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.h | 1 |
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 |