diff options
author | KONRAD Frederic <fred.konrad@greensocs.com> | 2013-01-15 00:08:03 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-21 13:23:12 -0600 |
commit | 0a2acf5eb3237350e84693b9b37eced5080a1fef (patch) | |
tree | 07c1e8d23f4c8c80461994e8a153add403fd4c80 /hw/virtio-pci.h | |
parent | 8e05db9234050cb3f0ffb765608dd8b176334ae1 (diff) |
virtio-pci-bus: introduce virtio-pci-bus.
Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pci
transport device.
Signed-off-by: KONRAD Frederic <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.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h index 917b465874..d11e6225de 100644 --- a/hw/virtio-pci.h +++ b/hw/virtio-pci.h @@ -21,6 +21,20 @@ #include "virtio-rng.h" #include "virtio-serial.h" #include "virtio-scsi.h" +#include "virtio-bus.h" + +/* virtio-pci-bus */ + +typedef struct VirtioBusState VirtioPCIBusState; +typedef struct VirtioBusClass VirtioPCIBusClass; + +#define TYPE_VIRTIO_PCI_BUS "virtio-pci-bus" +#define VIRTIO_PCI_BUS(obj) \ + OBJECT_CHECK(VirtioPCIBusState, (obj), TYPE_VIRTIO_PCI_BUS) +#define VIRTIO_PCI_BUS_GET_CLASS(obj) \ + OBJECT_GET_CLASS(VirtioPCIBusClass, obj, TYPE_VIRTIO_PCI_BUS) +#define VIRTIO_PCI_BUS_CLASS(klass) \ + OBJECT_CLASS_CHECK(VirtioPCIBusClass, klass, TYPE_VIRTIO_PCI_BUS) /* Performance improves when virtqueue kick processing is decoupled from the * vcpu thread using ioeventfd for some devices. */ @@ -58,6 +72,7 @@ typedef struct { void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev); void virtio_pci_reset(DeviceState *d); +void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev); /* Virtio ABI version, if we increment this, we break the guest driver. */ #define VIRTIO_PCI_ABI_VERSION 0 |