virtio: add a wrapper for virtio-backend initialization
commitc8075caf19b000b975349f8976958cedf7d2613a
authorGonglei <arei.gonglei@huawei.com>
Tue, 30 Sep 2014 06:10:38 +0000 (30 14:10 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Sep 2014 09:09:59 +0000 (30 11:09 +0200)
tree0d55002a87bb3bd8f63f38357347c52d3e3a6f54
parent8f3d60e568f53cb3ccdedd917f8e49cdb304973b
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>
hw/s390x/s390-virtio-bus.c
hw/s390x/virtio-ccw.c
hw/virtio/virtio-pci.c
hw/virtio/virtio.c
include/hw/virtio/virtio.h