Message ID | 9b8faccff994b2eb608fe7a7a9785a7e2d736db4.1352466944.git.amit.shah@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c index 42ac30b..bb19cfa 100644 --- a/hw/virtio-rng.c +++ b/hw/virtio-rng.c @@ -70,16 +70,6 @@ static void chr_read(void *opaque, const void *buf, size_t size) virtqueue_push(vrng->vq, &elem, len); } virtio_notify(&vrng->vdev, vrng->vq); - - /* - * Lastly, if we had multiple elems queued by the guest, and we - * didn't have enough data to fill them all, indicate we want more - * data. - */ - len = pop_an_elem(vrng); - if (len) { - rng_backend_request_entropy(vrng->rng, size, chr_read, vrng); - } } static void handle_input(VirtIODevice *vdev, VirtQueue *vq)
If we just got a few bytes from the backends, but the guest is ready to accept more, don't poke the backends once more for more bytes; it already knows (from the request in handle_input()). Signed-off-by: Amit Shah <amit.shah@redhat.com> --- hw/virtio-rng.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-)