mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
virtio-rng-pci: switch to the new API.
Here the virtio-rng-pci is modified for the new API. The device virtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-device during the init. The properties are not changed. The virtio_pci_reset function, is removed as no longer used. The virtio_pci_rst function, is renamed virtio_pci_reset. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
6eac8aec02
commit
59ccd20a9a
2 changed files with 74 additions and 90 deletions
|
@ -38,6 +38,7 @@ typedef struct VirtIOBalloonPCI VirtIOBalloonPCI;
|
|||
typedef struct VirtIOSerialPCI VirtIOSerialPCI;
|
||||
typedef struct VirtIONetPCI VirtIONetPCI;
|
||||
typedef struct VHostSCSIPCI VHostSCSIPCI;
|
||||
typedef struct VirtIORngPCI VirtIORngPCI;
|
||||
|
||||
/* virtio-pci-bus */
|
||||
|
||||
|
@ -87,7 +88,6 @@ struct VirtIOPCIProxy {
|
|||
uint32_t class_code;
|
||||
uint32_t nvectors;
|
||||
uint32_t host_features;
|
||||
VirtIORNGConf rng;
|
||||
bool ioeventfd_disabled;
|
||||
bool ioeventfd_started;
|
||||
VirtIOIRQFD *vector_irqfd;
|
||||
|
@ -188,6 +188,18 @@ typedef struct V9fsPCIState {
|
|||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* virtio-rng-pci: This extends VirtioPCIProxy.
|
||||
*/
|
||||
#define TYPE_VIRTIO_RNG_PCI "virtio-rng-pci"
|
||||
#define VIRTIO_RNG_PCI(obj) \
|
||||
OBJECT_CHECK(VirtIORngPCI, (obj), TYPE_VIRTIO_RNG_PCI)
|
||||
|
||||
struct VirtIORngPCI {
|
||||
VirtIOPCIProxy parent_obj;
|
||||
VirtIORNG vdev;
|
||||
};
|
||||
|
||||
void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
|
||||
void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue