aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-23 20:35:18 +0200
committerAndreas Färber <afaerber@suse.de>2013-08-30 20:14:39 +0200
commitac7af1120f589a5385e39b3decc3d2d944a4d656 (patch)
tree80ef68c6f9cd3c52a17807efe32457724ebab523 /hw/virtio
parentc889b3a55d5d1d18042693cbe2f8f05465914ff4 (diff)
virtio-pci: Pass size to virtio_pci_bus_new()
To be passed to qbus_create_inplace(). Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio-pci.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 8df43d6f23..606b4d4366 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -92,7 +92,8 @@
/* HACK for virtio to determine if it's running a big endian guest */
bool virtio_is_big_endian(void);
-static void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);
+static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
+ VirtIOPCIProxy *dev);
/* virtio device */
/* DeviceState to VirtIOPCIProxy. For use off data-path. TODO: use QOM. */
@@ -986,7 +987,7 @@ static int virtio_pci_init(PCIDevice *pci_dev)
{
VirtIOPCIProxy *dev = VIRTIO_PCI(pci_dev);
VirtioPCIClass *k = VIRTIO_PCI_GET_CLASS(pci_dev);
- virtio_pci_bus_new(&dev->bus, dev);
+ virtio_pci_bus_new(&dev->bus, sizeof(dev->bus), dev);
if (k->init != NULL) {
return k->init(dev);
}
@@ -1504,7 +1505,8 @@ static const TypeInfo virtio_rng_pci_info = {
/* virtio-pci-bus */
-static void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev)
+static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
+ VirtIOPCIProxy *dev)
{
DeviceState *qdev = DEVICE(dev);
BusState *qbus;