diff options
Diffstat (limited to 'hw/virtio-pci.h')
-rw-r--r-- | hw/virtio-pci.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h index 2ae96f8..a9dbfff 100644 --- a/hw/virtio-pci.h +++ b/hw/virtio-pci.h @@ -25,6 +25,7 @@ #include "hw/9pfs/virtio-9p-device.h" typedef struct VirtIOPCIProxy VirtIOPCIProxy; +typedef struct VirtIOBlkPCI VirtIOBlkPCI; /* virtio-pci-bus */ @@ -73,7 +74,6 @@ struct VirtIOPCIProxy { uint32_t flags; uint32_t class_code; uint32_t nvectors; - VirtIOBlkConf blk; NICConf nic; uint32_t host_features; #ifdef CONFIG_VIRTFS @@ -90,6 +90,19 @@ struct VirtIOPCIProxy { VirtioBusState bus; }; +/* + * virtio-blk-pci: This extends VirtioPCIProxy. + */ +#define TYPE_VIRTIO_BLK_PCI "virtio-blk-pci" +#define VIRTIO_BLK_PCI(obj) \ + OBJECT_CHECK(VirtIOBlkPCI, (obj), TYPE_VIRTIO_BLK_PCI) + +struct VirtIOBlkPCI { + VirtIOPCIProxy parent_obj; + VirtIOBlock vdev; + VirtIOBlkConf blk; +}; + void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev); void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev); |