[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties i
From: |
Alexey Kardashevskiy |
Subject: |
Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific |
Date: |
Thu, 3 May 2018 16:22:41 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 2/5/18 7:50 pm, Paolo Bonzini wrote:
> On 02/05/2018 11:33, Alexey Kardashevskiy wrote:
>>>>>>> +# Note: the handler creates an object, enumerates properties and
>>>>>>> destroys
>>>>>>> +# the object so it only lists properties created in
>>>>>>> TypeInfo::instance_init().
>>>>>>> +# Since the instance_init() callback of the device object adds
>>>>>>> +# DeviceClass::props as object properties, they will be listed as well.
>>
>> There are roughly 400 of realize(), this is will take a bit of time :)
>> imho what it does belongs to .json, why it does exactly that belongs to the
>> git commit log. I'll walk through the realize() hook though, educate
>> myself, at least :)
>
> Cheer up, there are only 300 callers of object_property_add_* (apart
> from object_property_add_child which is generally not an issue). You
> could look at those instead. :)
I did not have to go too far for an example:
piix4_pm_realize() calls piix4_pm_add_propeties() and acpi_pcihp_init() and
piix4_acpi_system_hot_add_init() and these guys create
bool/uint8_ptr/uint16_ptr/uint32_ptr properties:
hw/acpi/piix4.c|477| object_property_add_uint8_ptr(OBJECT(s),
ACPI_PM_PROP_ACPI_ENABLE_CMD,
hw/acpi/piix4.c|479| object_property_add_uint8_ptr(OBJECT(s),
ACPI_PM_PROP_ACPI_DISABLE_CMD,
hw/acpi/piix4.c|481| object_property_add_uint32_ptr(OBJECT(s),
ACPI_PM_PROP_GPE0_BLK,
hw/acpi/piix4.c|483| object_property_add_uint32_ptr(OBJECT(s),
ACPI_PM_PROP_GPE0_BLK_LEN,
hw/acpi/piix4.c|485| object_property_add_uint16_ptr(OBJECT(s),
ACPI_PM_PROP_SCI_INT,
hw/acpi/piix4.c|487| object_property_add_uint32_ptr(OBJECT(s),
ACPI_PM_PROP_PM_IO_BASE,
hw/acpi/piix4.c|642| object_property_add_bool(OBJECT(s), "cpu-hotplug-legacy",
> Seriously, I think the problem with the comment is only that the reader
> most likely doesn't care about instance_init() or props, as those are
> QEMU implementation details.
So I am putting the chunk below (cut-n-pasted from this thread) for each
command (i.e. twice) instead of my stuff and repost?
===
Objects can create properties at runtime, for example to describe
links between different devices and/or objects. These properties
are not included in the output of this command.
===
--
Alexey
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Eric Blake, 2018/05/01
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Markus Armbruster, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Paolo Bonzini, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Markus Armbruster, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Paolo Bonzini, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Markus Armbruster, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Paolo Bonzini, 2018/05/02