[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 32/61] virtio-balloon : show the VirtIOBalloon struc
From: |
fred . konrad |
Subject: |
[Qemu-devel] [PATCH 32/61] virtio-balloon : show the VirtIOBalloon structure. |
Date: |
Mon, 7 Jan 2013 19:40:45 +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-balloon-x.
Signed-off-by: KONRAD Frederic <address@hidden>
---
hw/virtio-balloon.c | 12 ------------
hw/virtio-balloon.h | 11 +++++++++++
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
index 3040bc6..3ea1790 100644
--- a/hw/virtio-balloon.c
+++ b/hw/virtio-balloon.c
@@ -27,18 +27,6 @@
#include <sys/mman.h>
#endif
-typedef struct VirtIOBalloon
-{
- VirtIODevice vdev;
- VirtQueue *ivq, *dvq, *svq;
- uint32_t num_pages;
- uint32_t actual;
- uint64_t stats[VIRTIO_BALLOON_S_NR];
- VirtQueueElement stats_vq_elem;
- size_t stats_vq_offset;
- DeviceState *qdev;
-} VirtIOBalloon;
-
static VirtIOBalloon *to_virtio_balloon(VirtIODevice *vdev)
{
return (VirtIOBalloon *)vdev;
diff --git a/hw/virtio-balloon.h b/hw/virtio-balloon.h
index b1828f4..0cd211e 100644
--- a/hw/virtio-balloon.h
+++ b/hw/virtio-balloon.h
@@ -52,4 +52,15 @@ typedef struct VirtIOBalloonStat {
uint64_t val;
} QEMU_PACKED VirtIOBalloonStat;
+typedef struct VirtIOBalloon {
+ VirtIODevice vdev;
+ VirtQueue *ivq, *dvq, *svq;
+ uint32_t num_pages;
+ uint32_t actual;
+ uint64_t stats[VIRTIO_BALLOON_S_NR];
+ VirtQueueElement stats_vq_elem;
+ size_t stats_vq_offset;
+ DeviceState *qdev;
+} VirtIOBalloon;
+
#endif
--
1.7.11.7
- [Qemu-devel] [PATCH 15/61] virtio-net : show the VirtIONet structure., (continued)
- [Qemu-devel] [PATCH 15/61] virtio-net : show the VirtIONet structure., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 13/61] virtio-blk : cleanup : use QOM cast., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 20/61] virtio-net : cleanup : init and exit function., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 18/61] virtio-net-s390 : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 23/61] virtio-scsi : don't use pointer for configuration., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 21/61] virtio-net : cleanup : remove qdev field., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 19/61] virtio-net : cleanup : use QOM cast., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 30/61] virtio-scsi : cleanup : init and exit functions., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 33/61] virtio-balloon : add the virtio-balloon device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 34/61] virtio-balloon-pci : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 32/61] virtio-balloon : show the VirtIOBalloon structure.,
fred . konrad <=
- [Qemu-devel] [PATCH 36/61] virtio-balloon : cleanup : QOM casts., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 35/61] virtio-balloon : cleanup : init and exit function., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 40/61] virtio-rng : add virtio-rng device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 41/61] virtio-rng-s390 : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 43/61] virtio-rng.c : cleanup : init and exit functions., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 49/61] virtio-serial-s390 : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 48/61] virtio-serial-pci : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 50/61] virtio-serial : cleanup : init and exit functions., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 42/61] virtio-rng-pci : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 47/61] virtio-serial : add the virtio-serial device., fred . konrad, 2013/01/07