From 74ded8b487a074aff89a642630c0402053f80d1b Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Mon, 24 Aug 2020 14:20:51 +0200 Subject: virtio: add Virtio*BusClass sizes Both VirtioPCIBusClass and VirtioCcwBusClass are typedefs of VirtioBusClass, but set .class_size in the TypeInfo anyway to be safe if that changes in the future. Reported-by: Eduardo Habkost Signed-off-by: Cornelia Huck Reviewed-by: Halil Pasic Message-Id: <20200824122051.99432-1-cohuck@redhat.com> --- hw/virtio/virtio-pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/virtio') diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index fc69570dcc..5bc769f685 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2133,6 +2133,7 @@ static const TypeInfo virtio_pci_bus_info = { .name = TYPE_VIRTIO_PCI_BUS, .parent = TYPE_VIRTIO_BUS, .instance_size = sizeof(VirtioPCIBusState), + .class_size = sizeof(VirtioPCIBusClass), .class_init = virtio_pci_bus_class_init, }; -- cgit v1.2.3