* [Qemu-devel] [PATCH qemu v2] qom: Document qom/device-list-properties implementation specific
@ 2018-05-14 7:38 Alexey Kardashevskiy
2018-05-15 12:07 ` Markus Armbruster
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kardashevskiy @ 2018-05-14 7:38 UTC (permalink / raw)
To: qemu-devel
Cc: Alexey Kardashevskiy, Eric Blake, Markus Armbruster,
Paolo Bonzini
The recently introduced qom-list-properties QMP command raised
a question what properties it (and its cousin - device-list-properties)
can possibly print - only those defined by DeviceClass::props
or dynamically created in TypeInfo::instance_init() so properties created
elsewhere won't show up and this behaviour might confuse the user.
For example, PIIX4 does that from piix4_pm_realize():
hw/acpi/piix4.c|477| object_property_add_uint8_ptr(OBJECT(s),
ACPI_PM_PROP_ACPI_ENABLE_CMD,
This adds a note to the command descriptions about the limitation.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* changed wording
---
qapi/misc.json | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/qapi/misc.json b/qapi/misc.json
index f5988cc..efc3d23 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -1529,6 +1529,10 @@
#
# Returns: a list of ObjectPropertyInfo describing a devices properties
#
+# Note: 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.
+#
# Since: 1.2
##
{ 'command': 'device-list-properties',
@@ -1542,6 +1546,10 @@
#
# @typename: the type name of an object
#
+# Note: 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.
+#
# Returns: a list of ObjectPropertyInfo describing object properties
#
# Since: 2.12
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH qemu v2] qom: Document qom/device-list-properties implementation specific
2018-05-14 7:38 [Qemu-devel] [PATCH qemu v2] qom: Document qom/device-list-properties implementation specific Alexey Kardashevskiy
@ 2018-05-15 12:07 ` Markus Armbruster
2018-05-15 12:31 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2018-05-15 12:07 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: qemu-devel, Paolo Bonzini
Alexey Kardashevskiy <aik@ozlabs.ru> writes:
> The recently introduced qom-list-properties QMP command raised
> a question what properties it (and its cousin - device-list-properties)
> can possibly print - only those defined by DeviceClass::props
> or dynamically created in TypeInfo::instance_init() so properties created
> elsewhere won't show up and this behaviour might confuse the user.
> For example, PIIX4 does that from piix4_pm_realize():
>
> hw/acpi/piix4.c|477| object_property_add_uint8_ptr(OBJECT(s),
> ACPI_PM_PROP_ACPI_ENABLE_CMD,
I'd like to tweak this to
For example, PIIX4 does that from piix4_pm_realize() via
piix4_pm_add_propeties():
object_property_add_uint8_ptr(OBJECT(s), ACPI_PM_PROP_ACPI_ENABLE_CMD,
&acpi_enable_cmd, NULL);
if you don't mind.
> This adds a note to the command descriptions about the limitation.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Thanks!
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH qemu v2] qom: Document qom/device-list-properties implementation specific
2018-05-15 12:07 ` Markus Armbruster
@ 2018-05-15 12:31 ` Paolo Bonzini
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2018-05-15 12:31 UTC (permalink / raw)
To: Markus Armbruster, Alexey Kardashevskiy; +Cc: qemu-devel
On 15/05/2018 14:07, Markus Armbruster wrote:
> Alexey Kardashevskiy <aik@ozlabs.ru> writes:
>
>> The recently introduced qom-list-properties QMP command raised
>> a question what properties it (and its cousin - device-list-properties)
>> can possibly print - only those defined by DeviceClass::props
>> or dynamically created in TypeInfo::instance_init() so properties created
>> elsewhere won't show up and this behaviour might confuse the user.
>> For example, PIIX4 does that from piix4_pm_realize():
>>
>> hw/acpi/piix4.c|477| object_property_add_uint8_ptr(OBJECT(s),
>> ACPI_PM_PROP_ACPI_ENABLE_CMD,
>
> I'd like to tweak this to
>
> For example, PIIX4 does that from piix4_pm_realize() via
> piix4_pm_add_propeties():
>
> object_property_add_uint8_ptr(OBJECT(s), ACPI_PM_PROP_ACPI_ENABLE_CMD,
> &acpi_enable_cmd, NULL);
>
> if you don't mind.
>
>> This adds a note to the command descriptions about the limitation.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>
> Thanks!
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Thanks,
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-15 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-14 7:38 [Qemu-devel] [PATCH qemu v2] qom: Document qom/device-list-properties implementation specific Alexey Kardashevskiy
2018-05-15 12:07 ` Markus Armbruster
2018-05-15 12:31 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).