aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-pci.h
diff options
context:
space:
mode:
authorKONRAD Frederic <fred.konrad@greensocs.com>2013-03-27 10:49:11 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-28 12:57:41 -0500
commite378e88dfc2dec2a60a856dd478a4edfbc88efd0 (patch)
treeea7d8382dd9b67919ebb4dc2de36893477bf8bbf /hw/virtio-pci.h
parent1ab461b534b34838d1b21c056ab37413f54fefa6 (diff)
virtio-balloon-pci: switch to the new API.
Here the virtio-balloon-pci is modified for the new API. The device virtio-balloon-pci extends virtio-pci. It creates and connects a virtio-balloon during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1364377755-15508-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-pci.h')
-rw-r--r--hw/virtio-pci.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h
index bfe7a8e1ca..f99f2eb80e 100644
--- a/hw/virtio-pci.h
+++ b/hw/virtio-pci.h
@@ -21,12 +21,14 @@
#include "hw/virtio-rng.h"
#include "hw/virtio-serial.h"
#include "hw/virtio-scsi.h"
+#include "hw/virtio-balloon.h"
#include "hw/virtio-bus.h"
#include "hw/9pfs/virtio-9p-device.h"
typedef struct VirtIOPCIProxy VirtIOPCIProxy;
typedef struct VirtIOBlkPCI VirtIOBlkPCI;
typedef struct VirtIOSCSIPCI VirtIOSCSIPCI;
+typedef struct VirtIOBalloonPCI VirtIOBalloonPCI;
/* virtio-pci-bus */
@@ -116,6 +118,18 @@ struct VirtIOBlkPCI {
VirtIOBlkConf blk;
};
+/*
+ * virtio-balloon-pci: This extends VirtioPCIProxy.
+ */
+#define TYPE_VIRTIO_BALLOON_PCI "virtio-balloon-pci"
+#define VIRTIO_BALLOON_PCI(obj) \
+ OBJECT_CHECK(VirtIOBalloonPCI, (obj), TYPE_VIRTIO_BALLOON_PCI)
+
+struct VirtIOBalloonPCI {
+ VirtIOPCIProxy parent_obj;
+ VirtIOBalloon vdev;
+};
+
void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);