On Tue, Oct 28, 2025 at 12:04 PM Peter Maydell <[email protected]> wrote: > > On Tue, 28 Oct 2025 at 10:34, Markus Armbruster <[email protected]> wrote: > > The problem: PCI addresses are integers in C and in QOM. Makes sense. > > But "info qtree" has always displayed PCI addresses in the form DEV.FN, > > which also makes sense. > > > > The pre-QOM solution: qdev property method .get() returns the integer, > > .print() formats it for humans. "info qtree" used the latter. > > > > Aside: "format for humans" may well be more widely applicable, if we > > care. > > Relatedly, there are various places where we define a "string" QOM > property and then format that into an underlying enum
That is intended, a QOM property type can be any QAPI type (in addition to link<class> and child<class>) and therefore it can be the name of an enum. The PCI address case was done like this (I imagine) to avoid exposing it as a string. Paolo
