aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-pci.h
diff options
context:
space:
mode:
authorKONRAD Frederic <fred.konrad@greensocs.com>2013-04-23 11:08:41 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-23 10:37:49 -0500
commit234a336f9e308ae60ad8ef8f2662eb0a93d7ff00 (patch)
treea4df09872375a6926eb1523ddfc86c302de4c34e /hw/virtio/virtio-pci.h
parente7303c43031302279ee7b5d6ea7031bf81e2e2d9 (diff)
virtio-9p-pci: switch to the new API.
Here the virtio-9p-pci is modified for the new API. The device virtio-9p-pci extends virtio-pci. It creates and connects a virtio-9p-device during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366708123-19626-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.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 1b66e4644a..db0185c3a6 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -24,6 +24,9 @@
#include "hw/virtio/virtio-balloon.h"
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-9p.h"
+#ifdef CONFIG_VIRTFS
+#include "hw/9pfs/virtio-9p.h"
+#endif
#ifdef CONFIG_VHOST_SCSI
#include "hw/virtio/vhost-scsi.h"
#endif
@@ -84,9 +87,6 @@ struct VirtIOPCIProxy {
uint32_t class_code;
uint32_t nvectors;
uint32_t host_features;
-#ifdef CONFIG_VIRTFS
- V9fsConf fsconf;
-#endif
VirtIORNGConf rng;
bool ioeventfd_disabled;
bool ioeventfd_started;
@@ -171,6 +171,23 @@ struct VirtIONetPCI {
VirtIONet vdev;
};
+/*
+ * virtio-9p-pci: This extends VirtioPCIProxy.
+ */
+
+#ifdef CONFIG_VIRTFS
+
+#define TYPE_VIRTIO_9P_PCI "virtio-9p-pci"
+#define VIRTIO_9P_PCI(obj) \
+ OBJECT_CHECK(V9fsPCIState, (obj), TYPE_VIRTIO_9P_PCI)
+
+typedef struct V9fsPCIState {
+ VirtIOPCIProxy parent_obj;
+ V9fsState vdev;
+} V9fsPCIState;
+
+#endif
+
void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);