qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: Intended purpose of virtio-rng's QOM link "rng"?
Date: Mon, 20 Jul 2020 11:56:32 -0400	[thread overview]
Message-ID: <20200720112838-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <87d04qfco3.fsf@dusky.pond.sub.org>

On Mon, Jul 20, 2020 at 05:07:08PM +0200, Markus Armbruster wrote:
> What is the intended purpose of object_property_set_link() in
> 
>     static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
>     {
>         VirtIORngPCI *vrng = VIRTIO_RNG_PCI(vpci_dev);
>         DeviceState *vdev = DEVICE(&vrng->vdev);
> 
>         if (!qdev_realize(vdev, BUS(&vpci_dev->bus), errp)) {
>             return;
>         }
> 
>         object_property_set_link(OBJECT(vrng), "rng", OBJECT(vrng->vdev.conf.rng),
>                                  NULL);
>     }
> 
> ?
> 
> I'm asking because the function *always* fails.  I believe it's been
> failing for years.
> 
> Similar code in the CCW buddy.  Also virtio-crypto-pci and
> virtio-crypto-ccw link "cryptodev".
> 
> I tried moving it before qdev_realize(), where it doesn't fail.  But
> then *I* fail, namely at finding any effect in QOM.

I suspect that's because there's already a link with that name
created by virtio core. Is that right?

> If it's really useless, I'll send a patch to drop it.
> 
> If it has a use, tell me more, so I can test my patch to move it.



  reply	other threads:[~2020-07-20 15:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 15:07 Intended purpose of virtio-rng's QOM link "rng"? Markus Armbruster
2020-07-20 15:56 ` Michael S. Tsirkin [this message]
2020-07-21  7:05   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200720112838-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).