Mathieu Poirier <mathieu.poir...@linaro.org> writes:
> This patch provides a PCI bus interface to the vhost-user-rng backed. > The implentation is similar to what was done for vhost-user-i2c-pci and > vhost-user-fs-pci. > > Signed-off-by: Mathieu Poirier <mathieu.poir...@linaro.org> > --- <snip> > +static void vhost_user_rng_pci_class_init(ObjectClass *klass, void *data) > +{ > + DeviceClass *dc = DEVICE_CLASS(klass); > + VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass); > + PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass); > + k->realize = vhost_user_rng_pci_realize; > + set_bit(DEVICE_CATEGORY_INPUT, dc->categories); > + device_class_set_props(dc, vhost_user_rng_pci_properties); > + pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET; > + pcidev_k->device_id = 0; /* Set by virtio-pci based on virtio id */ > + pcidev_k->revision = 0x00; > + pcidev_k->class_id = PCI_CLASS_COMMUNICATION_OTHER; I noticed the other RNGs use: pcidev_k->class_id = PCI_CLASS_OTHERS; -- Alex Bennée