virtio-rng: trigger timer only when guest requests for entropy
commit621a20e08155179b1902c428361e80f41429f50d
authorPankaj Gupta <pagupta@redhat.com>
Wed, 15 Jul 2015 12:16:47 +0000 (15 17:46 +0530)
committerAmit Shah <amit.shah@redhat.com>
Fri, 17 Jul 2015 13:35:16 +0000 (17 19:05 +0530)
treec9871f619742c9ec55f9ed6ab68a2b05ca2cc772
parent5b5e8cdd7da7a2214dd062afff5b866234aab228
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>
hw/virtio/virtio-rng.c
include/hw/virtio/virtio-rng.h