summary refs log tree commit diff stats
path: root/include/hw/virtio/virtio.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-30 00:50:27 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-12-09 21:46:49 +0100
commit1d244b42d200c02ad60eb564c75d8adea9243366 (patch)
treee8c32daaaccc6a737c7b03a22e2cdb4c7f5809f0 /include/hw/virtio/virtio.h
parent7598f0f30e027146ba70517a2bda98d16bac1e24 (diff)
downloadfocaccia-qemu-1d244b42d200c02ad60eb564c75d8adea9243366.tar.gz
focaccia-qemu-1d244b42d200c02ad60eb564c75d8adea9243366.zip
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/hw/virtio/virtio.h')
-rw-r--r--include/hw/virtio/virtio.h4
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);