On Fri, Feb 21, 2014 at 2:01 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > Il 21/02/2014 13:45, Stefan Hajnoczi ha scritto: >>>> The rng device examples don't seem to help because there is no way to >>>> specify the rng backend via a qdev property (we always create a default >>>> backend). I need to be able to specify the object via a qdev property >>>> to the virtio-blk-pci device. >>> >>> >>> >>> You can do that, see virtio-rng-pci. It creates a link and forwards that >>> to >>> virtio-rng. >> >> >> No, virtio-rng-pci has no rng qdev property. The user cannot set it >> on the command-line: > > > Sure, it has no *qdev* property, but lo and behold: > > qemu-system-x86_64 \ > -object rng-random,filename=/dev/random,id=rng0 \ > -device virtio-rng-pci,rng=rng0 > > This is why I believe we want static properties in QOM by the way, not just > in qdev. So that this rng property can be documented and not just magic.
Hrmm...so the command-line is already populating QOM properties and not qdev properties. Then adding DEFINE_PROP_LINK() isn't really necessary. Stefan