[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 38/61] virtio-rng : show the VirtIORNG structure.
From: |
fred . konrad |
Subject: |
[Qemu-devel] [PATCH 38/61] virtio-rng : show the VirtIORNG structure. |
Date: |
Mon, 7 Jan 2013 19:40:51 +0100 |
From: KONRAD Frederic <address@hidden>
As we discuss with anthony and andreas, this structure must be showed to avoid
two memory allocations for virtio-rng-x.
Signed-off-by: KONRAD Frederic <address@hidden>
---
hw/virtio-rng.c | 19 -------------------
hw/virtio-rng.h | 19 +++++++++++++++++++
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c
index e063127..d79aa46 100644
--- a/hw/virtio-rng.c
+++ b/hw/virtio-rng.c
@@ -15,25 +15,6 @@
#include "virtio-rng.h"
#include "qemu/rng.h"
-typedef struct VirtIORNG {
- VirtIODevice vdev;
-
- DeviceState *qdev;
-
- /* Only one vq - guest puts buffer(s) on it when it needs entropy */
- VirtQueue *vq;
-
- VirtIORNGConf *conf;
-
- RngBackend *rng;
-
- /* We purposefully don't migrate this state. The quota will reset on the
- * destination as a result. Rate limiting is host state, not guest state.
- */
- QEMUTimer *rate_limit_timer;
- int64_t quota_remaining;
-} VirtIORNG;
-
static bool is_guest_ready(VirtIORNG *vrng)
{
if (virtio_queue_ready(vrng->vq)
diff --git a/hw/virtio-rng.h b/hw/virtio-rng.h
index f42d748..3711c97 100644
--- a/hw/virtio-rng.h
+++ b/hw/virtio-rng.h
@@ -25,4 +25,23 @@ struct VirtIORNGConf {
RndRandom *default_backend;
};
+typedef struct VirtIORNG {
+ VirtIODevice vdev;
+
+ DeviceState *qdev;
+
+ /* Only one vq - guest puts buffer(s) on it when it needs entropy */
+ VirtQueue *vq;
+
+ VirtIORNGConf *conf;
+
+ RngBackend *rng;
+
+ /* We purposefully don't migrate this state. The quota will reset on the
+ * destination as a result. Rate limiting is host state, not guest state.
+ */
+ QEMUTimer *rate_limit_timer;
+ int64_t quota_remaining;
+} VirtIORNG;
+
#endif
--
1.7.11.7
- Re: [Qemu-devel] [PATCH 00/61] Virtio refactoring., (continued)
- [Qemu-devel] [PATCH 44/61] virtio-rng.c : cleanup : remove qdev field., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 26/61] virtio-scsi : add the virtio-scsi device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 24/61] virtio-scsi : allocate cmd_vqs array separately., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 45/61] virtio-rng.c : cleanup : use QOM casts., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 39/61] virtio-rng : don't use pointer for configuration., fred . konrad, 2013/01/07
- Re: [Qemu-devel] [PATCH 00/61] Virtio refactoring., Michael S. Tsirkin, 2013/01/07
- [Qemu-devel] [PATCH 52/61] virtio-serial : cleanup : remove qdev field., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 28/61] virtio-scsi-s390 : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 38/61] virtio-rng : show the VirtIORNG structure.,
fred . konrad <=
- [Qemu-devel] [PATCH 31/61] virtio-scsi : cleanup : remove qdev field., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 46/61] virtio-serial : show structures., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 37/61] virtio-balloon : cleanup : remove qdev field., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 27/61] virtio-scsi-pci : switch to new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 29/61] virtio-scsi : cleanup : use QOM casts., fred . konrad, 2013/01/07
- Re: [Qemu-devel] [PATCH 00/61] Virtio refactoring., Peter Maydell, 2013/01/08