]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-rng: use aliases instead of duplicate qdev properties
authorGonglei <arei.gonglei@huawei.com>
Tue, 30 Sep 2014 06:10:33 +0000 (14:10 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 6 Jan 2015 22:02:50 +0000 (16:02 -0600)
commitc4164eae39d65b6735724a181b027754970e08ea
treebdc20bf05a1e08bf292542d0803f9f81c27537bf
parent8c64b47eeb6488d579bfed311269e5b35960308b
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>
(cherry picked from commit 8ee486ae339f0e5236f4a9ab988fc963edcc73b5)
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