]> git.ipfire.org Git - thirdparty/qemu.git/commit
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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 6 Jan 2015 22:01:43 +0000 (16:01 -0600)
commiteb5388e2609e6e99352e8d9909f13f60d9d34fd0
treef294f2333d21f79eb04c56bcb8e76c22a23cd3fd
parent83f81f344f5523f47dc3a5dd229a3b8b1433fa17
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>
(cherry picked from commit c39343fd811a22c921fc08e9e6ca62c8e7539264)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/s390x/s390-virtio-bus.c
hw/s390x/virtio-ccw.c
hw/virtio/virtio-pci.c