On Thu, Feb 27, 2025 at 09:55:57AM +0100, Markus Armbruster wrote: > Properties using qdev_prop_pci_devfn initially accepted a string of > the form "DEV.FN" or "DEV" where DEV and FN are in hexadecimal. > Member @name was "pci-devfn" initially. > > Commit b403298adb5 (qdev: make the non-legacy pci address property > accept an integer) changed them to additionally accept integers: bits > 3..7 are DEV, and bits 0..2 are FN. This is inaccessible externally > in device_add so far. > > The commit also changed @name to "int32", and set member @legacy-name > to "pci-devfn". Together, this kept QMP command > device-list-properties unaffected: it used @name only when > @legacy_name was null. > > Commit 07d09c58dbb (qmp: Print descriptions of object properties) > quietly dumbed that down to use @name always, and the next commit > 18b91a3e082q (qdev: Drop legacy_name from qdev properties) dropped > member @legacy_name. This changed the value of @type reported by QMP > command device-list-properties from "pci-devfn" to "int32". > > But "int32" is misleading: device_add actually wants QAPI type "str". > So change @name to that.
That history is "fun" :-) > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > hw/core/qdev-properties-system.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|