qdev-properties: alias all object class properties
commit350147a871a545ab56b4a1062c8485635d9ffc24
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 20 Dec 2023 13:47:52 +0000 (20 08:47 -0500)
committerKevin Wolf <kwolf@redhat.com>
Thu, 21 Dec 2023 21:49:28 +0000 (21 22:49 +0100)
treec69ba8dcf7d32a91dabd82580d3877a91bde4b8a
parentff32bb53476539d352653f4ed56372dced73a388
qdev-properties: alias all object class properties

qdev_alias_all_properties() aliases a DeviceState's qdev properties onto
an Object. This is used for VirtioPCIProxy types so that --device
virtio-blk-pci has properties of its embedded --device virtio-blk-device
object.

Currently this function is implemented using qdev properties. Change the
function to use QOM object class properties instead. This works because
qdev properties create QOM object class properties, but it also catches
any QOM object class-only properties that have no qdev properties.

This change ensures that properties of devices are shown with --device
foo,\? even if they are QOM object class properties.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20231220134755.814917-2-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/core/qdev-properties.c
include/hw/qdev-properties.h