virtio/vhost-scsi: use aliases instead of duplicate qdev properties
authorGonglei <arei.gonglei@huawei.com>
Tue, 30 Sep 2014 06:10:29 +0000 (14:10 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Sep 2014 09:08:41 +0000 (11:08 +0200)
commitc39343fd811a22c921fc08e9e6ca62c8e7539264
tree5c6378afa782bdad9b446005bda18993e51a5fcf
parent6a0c6b59788627541faf70864464f1e155dc18d7
virtio/vhost-scsi: use aliases instead of duplicate qdev properties

{virtio, vhost}-scsi-{pci, s390, ccw} all duplicate the
qdev properties of their VirtIOSCSI/VHostSCSI child.
This approach does not work well with string or pointer
properties since we must be careful about leaking or
double-freeing them.

Use the QOM alias property to forward property accesses to the
VirtIOSCSI/VHostSCSI child. This way no duplication is necessary.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/s390x/s390-virtio-bus.c
hw/s390x/virtio-ccw.c
hw/virtio/virtio-pci.c