qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: aquini@redhat.com, mst@redhat.com, anton.vorontsov@linaro.org,
	agl@us.ibm.com, amit.shah@redhat.com
Subject: [Qemu-devel] [RFC 2/3] virtio-balloon: add virtio_balloon_conf skeleton
Date: Tue, 18 Dec 2012 18:16:54 -0200	[thread overview]
Message-ID: <1355861815-2607-3-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1355861815-2607-1-git-send-email-lcapitulino@redhat.com>

Next commit wants it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/virtio-balloon.c | 2 +-
 hw/virtio-balloon.h | 4 ++++
 hw/virtio-pci.c     | 2 +-
 hw/virtio-pci.h     | 2 ++
 hw/virtio.h         | 3 ++-
 5 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
index 03248df..97d49b1 100644
--- a/hw/virtio-balloon.c
+++ b/hw/virtio-balloon.c
@@ -235,7 +235,7 @@ static int virtio_balloon_load(QEMUFile *f, void *opaque, int version_id)
     return 0;
 }
 
-VirtIODevice *virtio_balloon_init(DeviceState *dev)
+VirtIODevice *virtio_balloon_init(DeviceState *dev, virtio_balloon_conf *conf)
 {
     VirtIOBalloon *s;
     int ret;
diff --git a/hw/virtio-balloon.h b/hw/virtio-balloon.h
index 73300dd..9d631d5 100644
--- a/hw/virtio-balloon.h
+++ b/hw/virtio-balloon.h
@@ -38,6 +38,10 @@ struct virtio_balloon_config
     uint32_t actual;
 };
 
+typedef struct virtio_balloon_conf
+{
+} virtio_balloon_conf;
+
 /* Memory Statistics */
 #define VIRTIO_BALLOON_S_SWAP_IN  0   /* Amount of memory swapped in */
 #define VIRTIO_BALLOON_S_SWAP_OUT 1   /* Amount of memory swapped out */
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 7684ac9..026222b 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -835,7 +835,7 @@ static int virtio_balloon_init_pci(PCIDevice *pci_dev)
         proxy->class_code = PCI_CLASS_OTHERS;
     }
 
-    vdev = virtio_balloon_init(&pci_dev->qdev);
+    vdev = virtio_balloon_init(&pci_dev->qdev, &proxy->balloon);
     if (!vdev) {
         return -1;
     }
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h
index b58d9a2..3e4ca0d 100644
--- a/hw/virtio-pci.h
+++ b/hw/virtio-pci.h
@@ -20,6 +20,7 @@
 #include "virtio-rng.h"
 #include "virtio-serial.h"
 #include "virtio-scsi.h"
+#include "virtio-balloon.h"
 
 /* Performance improves when virtqueue kick processing is decoupled from the
  * vcpu thread using ioeventfd for some devices. */
@@ -46,6 +47,7 @@ typedef struct {
 #endif
     virtio_serial_conf serial;
     virtio_net_conf net;
+    virtio_balloon_conf balloon;
     VirtIOSCSIConf scsi;
     VirtIORNGConf rng;
     bool ioeventfd_disabled;
diff --git a/hw/virtio.h b/hw/virtio.h
index 7c17f7b..9a85a41 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -201,7 +201,8 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf,
                               struct virtio_net_conf *net);
 typedef struct virtio_serial_conf virtio_serial_conf;
 VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *serial);
-VirtIODevice *virtio_balloon_init(DeviceState *dev);
+typedef struct virtio_balloon_conf virtio_balloon_conf;
+VirtIODevice *virtio_balloon_init(DeviceState *dev, virtio_balloon_conf *conf);
 typedef struct VirtIOSCSIConf VirtIOSCSIConf;
 VirtIODevice *virtio_scsi_init(DeviceState *dev, VirtIOSCSIConf *conf);
 typedef struct VirtIORNGConf VirtIORNGConf;
-- 
1.8.0

  parent reply	other threads:[~2012-12-18 20:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 20:16 [Qemu-devel] [RFC 0/3] auto-ballooning prototype (host part) Luiz Capitulino
2012-12-18 20:16 ` [Qemu-devel] [RFC 1/3] virtio-balloon: add guest_get_actual_ram() Luiz Capitulino
2012-12-18 20:16 ` Luiz Capitulino [this message]
2012-12-18 20:16 ` [Qemu-devel] [RFC 3/3] virtio-balloon: add auto-ballooning support Luiz Capitulino
2012-12-18 22:53   ` Anton Vorontsov
2012-12-19 11:30     ` Luiz Capitulino
2012-12-20  5:24       ` Dietmar Maurer
2012-12-22 21:45         ` Luiz Capitulino
2013-01-11 20:32   ` Amit Shah
2013-01-14 11:58     ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1355861815-2607-3-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=agl@us.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=anton.vorontsov@linaro.org \
    --cc=aquini@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).