On Thu, 19 Jul 2018 13:06:59 +0200 Thomas Huth <th...@redhat.com> wrote:
> On 17.07.2018 19:00, Juan Quintela wrote: > > So far so good, but look at virtio-pci.c: > > > > static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) > > { > > ... > > } > > > > static void virtio_rng_pci_class_init(ObjectClass *klass, void *data) > > { > > .... > > } > > > > static void virtio_rng_initfn(Object *obj) > > { > > ... > > } > > > > static const TypeInfo virtio_rng_pci_info = { > > .name = TYPE_VIRTIO_RNG_PCI, > > .parent = TYPE_VIRTIO_PCI, > > .instance_size = sizeof(VirtIORngPCI), > > .instance_init = virtio_rng_initfn, > > .class_init = virtio_rng_pci_class_init, > > }; > > > > static void virtio_pci_register_types(void) > > { > > type_register_static(&virtio_rng_pci_info); > > ... > > } > > > > See, we have defined the device "virtio-rng-pci", but there is no > > implementation. WHen I run device-intronspection-test on that qemu with > > CONFIG_VIRTIO_RNG, it fails to run. If we can agree that something is > > wrong, then we can search for a solution. > > I agree with you that the current situation with virtio-pci. c is bad. I > think we should split it up into individual files instead > (virtio-pci-rng.c etc.). We should then do the same thing for virtio-ccw as well.