diff options
author | Gonglei <arei.gonglei@huawei.com> | 2014-09-30 14:10:38 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-30 11:09:59 +0200 |
commit | c8075caf19b000b975349f8976958cedf7d2613a (patch) | |
tree | 0d55002a87bb3bd8f63f38357347c52d3e3a6f54 /include | |
parent | 8f3d60e568f53cb3ccdedd917f8e49cdb304973b (diff) | |
download | hqemu-c8075caf19b000b975349f8976958cedf7d2613a.zip hqemu-c8075caf19b000b975349f8976958cedf7d2613a.tar.gz |
virtio: add a wrapper for virtio-backend initialization
For better code sharing, add a helper function that handles
reference counting of the virtio backend for virtio proxy devices.
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/virtio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a60104c..0726d76 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -161,6 +161,9 @@ typedef struct VirtioDeviceClass { int (*load)(VirtIODevice *vdev, QEMUFile *f, int version_id); } VirtioDeviceClass; +void virtio_instance_init_common(Object *proxy_obj, void *data, + size_t vdev_size, const char *vdev_name); + void virtio_init(VirtIODevice *vdev, const char *name, uint16_t device_id, size_t config_size); void virtio_cleanup(VirtIODevice *vdev); |