aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-pci.h
diff options
context:
space:
mode:
authorKONRAD Frederic <fred.konrad@greensocs.com>2013-04-09 14:53:31 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-15 10:22:04 -0500
commitf7f7464afdb9f6f792de080ca4b3c520168513ad (patch)
tree7d452543edadfc88849649fff5a945ee86c519e5 /hw/virtio/virtio-pci.h
parent2cd2b016a145c57204ab629d2876b7e0a931ab12 (diff)
virtio-serial-pci: switch to the new API.
Here the virtio-serial-pci is modified for the new API. The device virtio-serial-pci extends virtio-pci. It creates and connects a virtio-serial 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> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1365512016-21944-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio/virtio-pci.h')
-rw-r--r--hw/virtio/virtio-pci.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index fb83155016..879cc83582 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -29,6 +29,7 @@ typedef struct VirtIOPCIProxy VirtIOPCIProxy;
typedef struct VirtIOBlkPCI VirtIOBlkPCI;
typedef struct VirtIOSCSIPCI VirtIOSCSIPCI;
typedef struct VirtIOBalloonPCI VirtIOBalloonPCI;
+typedef struct VirtIOSerialPCI VirtIOSerialPCI;
/* virtio-pci-bus */
@@ -82,7 +83,6 @@ struct VirtIOPCIProxy {
#ifdef CONFIG_VIRTFS
V9fsConf fsconf;
#endif
- virtio_serial_conf serial;
virtio_net_conf net;
VirtIORNGConf rng;
bool ioeventfd_disabled;
@@ -130,6 +130,18 @@ struct VirtIOBalloonPCI {
VirtIOBalloon vdev;
};
+/*
+ * virtio-serial-pci: This extends VirtioPCIProxy.
+ */
+#define TYPE_VIRTIO_SERIAL_PCI "virtio-serial-pci"
+#define VIRTIO_SERIAL_PCI(obj) \
+ OBJECT_CHECK(VirtIOSerialPCI, (obj), TYPE_VIRTIO_SERIAL_PCI)
+
+struct VirtIOSerialPCI {
+ VirtIOPCIProxy parent_obj;
+ VirtIOSerial vdev;
+};
+
void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);