mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
virtio: Start converting VirtioDevice to QOM realize
Temporarily allow either VirtioDeviceClass::init or VirtioDeviceClass::realize. Introduce VirtioDeviceClass::unrealize for symmetry. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7598f0f30e
commit
1d244b42d2
2 changed files with 29 additions and 15 deletions
|
@ -124,10 +124,12 @@ struct VirtIODevice
|
|||
};
|
||||
|
||||
typedef struct VirtioDeviceClass {
|
||||
/* This is what a VirtioDevice must implement */
|
||||
DeviceClass parent;
|
||||
|
||||
/* This is what a VirtioDevice must implement */
|
||||
int (*init)(VirtIODevice *vdev);
|
||||
void (*exit)(VirtIODevice *vdev);
|
||||
DeviceRealize realize;
|
||||
uint32_t (*get_features)(VirtIODevice *vdev, uint32_t requested_features);
|
||||
uint32_t (*bad_features)(VirtIODevice *vdev);
|
||||
void (*set_features)(VirtIODevice *vdev, uint32_t val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue