Markus Armbruster <[email protected]> writes:
> Marc-André Lureau <[email protected]> writes:
>
>> Hi
>>
>>
>> On Wed, Oct 22, 2025 at 2:15 PM Markus Armbruster <[email protected]> wrote:
>>>
>>> Signed-off-by: Markus Armbruster <[email protected]>
>>
>> I don't think we have much reasonable way to use those "legacy-*"
>> properties from qom-get and similar, so it's probably ok to just
>> remove them without deprecation.
>
> Almost all of them are unreadable via qom-get:
>
> (qemu) qom-get /machine/unattached/device[3]/pm bus
> "/machine/i440fx/pci.0"
> (qemu) qom-get /machine/unattached/device[3]/pm legacy-bus
> Error: Property 'PIIX4_PM.legacy-bus' is not readable
>
> Same for all the other properties where the qdev property doesn't have a
> .get().
>
> Only the ones with a .print() are readable, i.e. only PCI address
> properties:
>
> (qemu) qom-get /machine/unattached/device[3]/pm addr
> 11
> (qemu) qom-get /machine/unattached/device[3]/pm legacy-addr
> "01.3"
>
> PATCH 2's commit message explains why.
>
> If a deprecation period is wanted, I'll replace this patch.
>
> If not, I can work the above into the commit message.
In my tree now:
qdev: Legacy properties are now unused internally, drop
Legacy properties are an accidental and undocumented external
interface. qom-set doesn't work for them (no .set() method). qom-get
and qom-list-get work only when the underlying qdev property has a
.print() method, i.e. the PCI address properties, as explained in the
previous commit. Here's one that works:
(qemu) qom-get /machine/unattached/device[3]/pm addr
11
(qemu) qom-get /machine/unattached/device[3]/pm legacy-addr
"01.3"
And here's one that doesn't:
(qemu) qom-get /machine/unattached/device[3]/pm bus
"/machine/i440fx/pci.0"
(qemu) qom-get /machine/unattached/device[3]/pm legacy-bus
Error: Property 'PIIX4_PM.legacy-bus' is not readable
Actual use of this undocumented interface seems quite unlikely. A
deprecation period seems unnecessary. Drop it.
>> Acked-by: Marc-André Lureau <[email protected]>
>
> Thanks!