aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio/virtio-pci.h')
-rw-r--r--hw/virtio/virtio-pci.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 879cc83582..aa67561c04 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -30,6 +30,7 @@ typedef struct VirtIOBlkPCI VirtIOBlkPCI;
typedef struct VirtIOSCSIPCI VirtIOSCSIPCI;
typedef struct VirtIOBalloonPCI VirtIOBalloonPCI;
typedef struct VirtIOSerialPCI VirtIOSerialPCI;
+typedef struct VirtIONetPCI VirtIONetPCI;
/* virtio-pci-bus */
@@ -78,12 +79,10 @@ struct VirtIOPCIProxy {
uint32_t flags;
uint32_t class_code;
uint32_t nvectors;
- NICConf nic;
uint32_t host_features;
#ifdef CONFIG_VIRTFS
V9fsConf fsconf;
#endif
- virtio_net_conf net;
VirtIORNGConf rng;
bool ioeventfd_disabled;
bool ioeventfd_started;
@@ -142,6 +141,18 @@ struct VirtIOSerialPCI {
VirtIOSerial vdev;
};
+/*
+ * virtio-net-pci: This extends VirtioPCIProxy.
+ */
+#define TYPE_VIRTIO_NET_PCI "virtio-net-pci"
+#define VIRTIO_NET_PCI(obj) \
+ OBJECT_CHECK(VirtIONetPCI, (obj), TYPE_VIRTIO_NET_PCI)
+
+struct VirtIONetPCI {
+ VirtIOPCIProxy parent_obj;
+ VirtIONet vdev;
+};
+
void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);