virtio-rng: use aliases instead of duplicate qdev properties
commit8ee486ae339f0e5236f4a9ab988fc963edcc73b5
authorGonglei <arei.gonglei@huawei.com>
Tue, 30 Sep 2014 06:10:33 +0000 (30 14:10 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Sep 2014 09:09:21 +0000 (30 11:09 +0200)
treef1ad4541c3fabdcda8ef04a9110af67a2f75d563
parente77ca8b92af8a5213897331d676089e8919f383d
virtio-rng: use aliases instead of duplicate qdev properties

virtio-rng-{pci, s390, ccw} all duplicate the
qdev properties of their VirtIORNG 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
VirtIORNG 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