diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-30 00:50:27 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-12-09 21:46:49 +0100 |
commit | 1d244b42d200c02ad60eb564c75d8adea9243366 (patch) | |
tree | e8c32daaaccc6a737c7b03a22e2cdb4c7f5809f0 /include | |
parent | 7598f0f30e027146ba70517a2bda98d16bac1e24 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/virtio.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 59756c29b9..54c5efe4d0 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -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); |