QAPI patches for 2026-11-06
The following changes since commit f71afb409a87c4ecd0f9d63a5963eb645dfab780:
Merge tag 'pull-loongarch-20261105' of https://github.com/bibo-mao/qemu into staging (2026-11-05 07:24:53 -0800)
are available in the Git repository at:
https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2026-11-06
for you to fetch changes up to 6955264d5821b453d3e68472009fe445b55e6311:
qom: Convert child and link properties to QAPI-aware registration (2026-11-06 12:56:26 +0100)
----------------------------------------------------------------
QAPI patches for 2026-11-06
----------------------------------------------------------------
Markus Armbruster (6):
qapi: Consistently use x.y with since
target/riscv: Fix up PropertyInfo to set @qapi_type hw/gpio/pca9552: Fix @type of pca9552 property led<N>
hw: Fix up PropertyInfo to set @qapi_type
qom: Convert alias properties to QAPI-aware registration
qom: Convert child and link properties to QAPI-aware registration
docs/devel/qapi-code-gen.rst | 4 ++-- docs/interop/firmware.json | 4 ++-- qapi/accelerator.json | 6 +++--- qapi/crypto.json | 2 +- hw/gpio/pca9552.c | 5 +++-- hw/gpio/pca9554.c | 5 +++-- qom/object.c | 13 +++++++------ target/riscv/cpu.c | 1 + 8 files changed, 22 insertions(+), 18 deletions(-)
Signature · 1 line
2.55.0
[PULL 1/6] qapi: Consistently use x.y with since
docs/devel/qapi-code-gen.rst documents "Since: x.y.z" and "(since x.y.z)", but we almost always use just x.y. Makes sense, because .z is exclusively for stable branches, where we generally don't mess with QAPI schemas.
Adjust the doc and the exceptions to the ruling practice. Do not touch versions prior to 3.0.0, because .z was not for stable branches back then.
Message-ID: <[email protected]>
--- docs/devel/qapi-code-gen.rst | 4 ++-- docs/interop/firmware.json | 4 ++-- qapi/accelerator.json | 6 +++--- qapi/crypto.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)
docs/devel/qapi-code-gen.rst +2 -2
@@ -1001,7 +1001,7 @@ indented like this:: .. FIXME union branches should be described, too. Extensions added after the definition was first released carry a -"(since x.y.z)" comment. +"(since x.y)" comment. The feature descriptions must be preceded by a blank line and then a line "Features:", like this::
@@ -1034,7 +1034,7 @@ detailing a relevant error condition. For example:: # - If @device does not exist, DeviceNotFound # - Any other error returns a GenericError. -A "Since: x.y.z" tagged section lists the release that introduced the +A "Since: x.y" tagged section lists the release that introduced the definition. "TODO" sections are not rendered (they are for developers, not users of
docs/interop/firmware.json +2 -2
@@ -283,7 +283,7 @@ # and can be shared between multiple guests. No NVRAM template # will be specified. # -# Since: 7.0.0 +# Since: 7.0 ## { 'enum': 'FirmwareFlashMode', 'data': [ 'split', 'combined', 'stateless' ] }
@@ -296,7 +296,7 @@ # # @mode: Describes how the firmware build handles code versus variable # storage. If not present, it must be treated as if it was -# configured with value @split. Since: 7.0.0 +# configured with value @split. (Since: 7.0) # # @executable: Identifies the firmware executable. The @mode # indicates whether there will be an associated NVRAM template
qapi/accelerator.json +3 -3
@@ -78,7 +78,7 @@ # # @xen: Xen # -# Since: 10.2.0 +# Since: 10.2 ## { 'enum': 'Accelerator', 'data': ['hvf', 'kvm', 'mshv', 'nvmm', 'qtest', 'tcg', 'whpx', 'xen'] }
@@ -91,7 +91,7 @@ # @present: the list of accelerators that are built into this # executable # -# Since: 10.2.0 +# Since: 10.2 ## { 'struct': 'AcceleratorInfo', 'data': {'enabled': 'Accelerator', 'present': ['Accelerator']} }
@@ -101,7 +101,7 @@ # # Returns: @AcceleratorInfo # -# Since: 10.2.0 +# Since: 10.2 # # .. qmp-example:: #
qapi/crypto.json +1 -1
@@ -57,7 +57,7 @@ # # @ripemd160: RIPEMD-160. (since 2.7) # -# @sm3: SM3. (since 9.2.0) +# @sm3: SM3. (since 9.2) # # Since: 2.6 ##
Signature · 1 line
2.55.0
[PULL 2/6] target/riscv: Fix up PropertyInfo to set @qapi_type
In reply to Markus ArmbrusterWhen we recently updated PropertyInfo to set @qapi_type, we missed one. Update it now.
Message-ID: <[email protected]>
--- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+)
target/riscv/cpu.c +1 -0
@@ -2075,6 +2075,7 @@ static void prop_vlen_get(Object *obj, Visitor *v, const char *name,static const PropertyInfo prop_vlen = { .type ="uint16" , + .qapi_type = &uint16_type_info, .description ="vlen" , .get = prop_vlen_get, .set = prop_vlen_set,
Signature · 1 line
2.55.0
[PULL 4/6] hw: Fix up PropertyInfo to set @qapi_type
In reply to Markus ArmbrusterWhen we recently updated PropertyInfo to set @qapi_type, we missed a few. Update them now.
Message-ID: <[email protected]>
--- hw/gpio/pca9552.c | 5 +++-- hw/gpio/pca9554.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
hw/gpio/pca9552.c +3 -2
@@ -23,6 +23,7 @@#include "hw/core/irq.h" #include "migration/vmstate.h" #include "qapi/error.h" +#include "qapi/qapi-builtin-type-infos.h" #include "qapi/visitor.h" #include "trace.h" #include "qom/object.h"
@@ -567,12 +568,12 @@ static void pca955x_initfn(Object *obj)if (k->has_led_support) {/* LED variant: expose the LED selector state as led%d. */ name =g_strdup_printf ("led%d" , ix); -object_property_add (obj, name,"str" ,NULL , +object_property_add (obj, name,"str" , &str_type_info, pca955x_get_led, pca955x_set_led,NULL ,NULL ); }else {/* GPIO variant: expose the pin logic level as pin%d. */ name =g_strdup_printf ("pin%d" , ix); -object_property_add (obj, name,"str" ,NULL , +object_property_add (obj, name,"str" , &str_type_info, pca955x_get_pin, pca955x_set_pin,NULL ,NULL ); }g_free (name);
hw/gpio/pca9554.c +3 -2
@@ -16,6 +16,7 @@#include "hw/core/irq.h" #include "migration/vmstate.h" #include "qapi/error.h" +#include "qapi/qapi-builtin-type-infos.h" #include "qapi/visitor.h" #include "trace.h" #include "qom/object.h"
@@ -280,8 +281,8 @@ static void pca9554_initfn(Object *obj)char *name; name =g_strdup_printf ("pin%d" , pin); -object_property_add (obj, name,"str" ,NULL , pca9554_get_pin, - pca9554_set_pin, +object_property_add (obj, name,"str" , &str_type_info, + pca9554_get_pin, pca9554_set_pin,NULL ,NULL );g_free (name); }
Signature · 1 line
2.55.0
[PULL 6/6] qom: Convert child and link properties to QAPI-aware registration
In reply to Markus ArmbrusterChild and link properties get serialized as QOM paths, i.e. as strings. Use &str_type_info for them.
Message-ID: <[email protected]>
--- qom/object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
qom/object.c +3 -3
@@ -1914,7 +1914,7 @@ object_property_try_add_child(Object *obj, const char *name, type =g_strdup_printf ("child<%s>" ,object_get_typename (child)); - op =object_property_try_add (obj, name, type,NULL , + op =object_property_try_add (obj, name, type, &str_type_info, object_get_child_property,NULL , object_finalize_child_property, child, errp);
@@ -2109,7 +2109,7 @@ object_add_link_prop(Object *obj, const char *name, full_type =g_strdup_printf ("link<%s>" , type); - op = object_property_add(obj, name, full_type, NULL, + op = object_property_add(obj, name, full_type, &str_type_info, object_get_link_property, check ? object_set_link_property : NULL, object_release_link_property,
@@ -2146,7 +2146,7 @@ object_class_property_add_link(ObjectClass *oc, full_type =g_strdup_printf ("link<%s>" , type); - op = object_class_property_add(oc, name, full_type, NULL, + op = object_class_property_add(oc, name, full_type, &str_type_info, object_get_link_property, check ? object_set_link_property : NULL, object_release_link_property,
Signature · 1 line
2.55.0
[PULL 3/6] hw/gpio/pca9552: Fix @type of pca9552 property led<N>
In reply to Markus Armbrusterpca955x_initfn() passes @type "bool" to object_property_add(). The properties are actually string-typed: pca955x_get_led() and pca955x_set_led() use visit_type_str(). Pass "str" instead.
Message-ID: <[email protected]>
--- hw/gpio/pca9552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/gpio/pca9552.c +1 -1
@@ -567,7 +567,7 @@ static void pca955x_initfn(Object *obj)if (k->has_led_support) {/* LED variant: expose the LED selector state as led%d. */ name =g_strdup_printf ("led%d" , ix); -object_property_add (obj, name,"bool" ,NULL , +object_property_add (obj, name,"str" ,NULL , pca955x_get_led, pca955x_set_led,NULL ,NULL ); }else {/* GPIO variant: expose the pin logic level as pin%d. */
Signature · 1 line
2.55.0
[PULL 5/6] qom: Convert alias properties to QAPI-aware registration
In reply to Markus ArmbrusterPass the target property's QAPITypeInfo to object_class_property_add() / object_property_add().
Commit 53c674710b4 (qom: add qapi_type field to ObjectProperty) already monkey-patched it in object_property_add_alias(), but not in object_class_property_add_alias(). Delete that.
Message-ID: <[email protected]>
--- qom/object.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
qom/object.c +4 -3
@@ -3099,13 +3099,13 @@ object_property_add_alias(Object *obj, const char *name, prop->target_name =g_strdup (target_name); prop->flags =0 ; - op =object_property_add (obj, name, prop_type,NULL , + op =object_property_add (obj, name, prop_type, + target_prop->qapi_type, property_get_alias, property_set_alias, property_release_alias, prop); op->resolve = property_resolve_alias; - op->qapi_type = target_prop->qapi_type;if (target_prop->defval) { op->defval =qobject_ref (target_prop->defval); }
@@ -3144,7 +3144,8 @@ object_class_property_add_alias(ObjectClass *klass, const char *name, prop->target_name =g_strdup (target_name); prop->flags =OBJ_PROP_ALIAS_CLASS ; - op = object_class_property_add(klass, name, prop_type, NULL, + op = object_class_property_add(klass, name, prop_type, + target_prop->qapi_type, property_get_alias, property_set_alias, property_release_alias,
Signature · 1 line
2.55.0
Richard Henderson
AppliedQuoted 6 lines · Markus Armbruster
The following changes since commit
f71afb409a87c4ecd0f9d63a5963eb645dfab780:Merge tag 'pull-loongarch-20261105' ofhttps://github.com/bibo-mao/qemu into staging (2026-11-05 07:24:53 -0800)are available in the Git repository at:
Quoted 8 lines
https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2026-11-06for you to fetch changes up to
6955264d5821b453d3e68472009fe445b55e6311:qom: Convert child and link properties to QAPI-aware registration (2026-11-06 12:56:26 +0100)
----------------------------------------------------------------
QAPI patches for 2026-11-06
Applied, thanks.
r~