qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/4] vhost-user-rng-pci: Add vhost-user-rng-pci implementa


From: Alex Bennée
Subject: Re: [PATCH v3 2/4] vhost-user-rng-pci: Add vhost-user-rng-pci implementation
Date: Wed, 21 Jul 2021 21:15:56 +0100
User-agent: mu4e 1.5.14; emacs 28.0.50

Mathieu Poirier <mathieu.poirier@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.poirier@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]