qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Intended purpose of virtio-rng's QOM link "rng"?


From: Markus Armbruster
Subject: Intended purpose of virtio-rng's QOM link "rng"?
Date: Mon, 20 Jul 2020 17:07:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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.

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 via email to

[Prev in Thread] Current Thread [Next in Thread]