[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] virtio-rng: remove extra request for entropy
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PATCH 2/3] virtio-rng: remove extra request for entropy |
Date: |
Fri, 9 Nov 2012 14:27:30 +0100 |
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 <address@hidden>
---
hw/virtio-rng.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
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)
--
1.7.7.6