Skip to contentSkip to conversation

qapi: Preliminary work for better QOM introspection

RFC PATCH Superseded Markus Armbruster 2 participants 13 messages Oct 9 – Oct 19

v1 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

cover qapi: Preliminary work for better QOM introspection

Marc-André Lureau has patches to improve QOM introspection. Latest version is

    Subject: [PATCH v5 00/62] qom/qdev: associate properties with QAPI schema types 
    Date: Fri, 11 Sep 2026 20:34:34 +0400
    Message-Id: <[email protected]>
    https://lore.kernel.org/qemu-devel/[email protected]/

The first few patches make the QAPI code generator emit type information for use by QOM introspection commands. They refactor code to gain access to masked type names, and to make query-qmp-schema not elide types QOM introspection might want to refer to.

My series does this in a different way I find simpler. It is RFC because merging it only makes sense if Marc-André finds it useful. Marc-André, please have a look.

Markus Armbruster (6):
qapi/schema: Rename .lookup_entity() and tighten return type
qapi: Ease access to introspection names qapi/introspect: Simplify masked name comment emission slighly qapi/introspect: Don't elide types
qapi: QAPISchemaVisitor.visit_needed() is now unused, drop qapi/introspect: Tweak integer type masking

 docs/sphinx/qapidoc.py     |  2 +-
 scripts/qapi/introspect.py | 74 ++++++++++----------------------------
 scripts/qapi/schema.py     | 57 +++++++++++++++++++++++------
 3 files changed, 67 insertions(+), 66 deletions(-)
Signature · 1 line
2.55.0
#1 lore raw

RFC PATCH 1/6 qapi/schema: Rename .lookup_entity() and tighten return type

Commit 060b5a9323 (qapi: Dumb down QAPISchema.lookup_entity()) accidentally relaxed QAPISchema.lookup_entity()'s return type to QAPISchemaEntity. Tighten it back to QAPISchemaDefinition, and rename the method to .lookup_defn().

---
 docs/sphinx/qapidoc.py | 2 +-
 scripts/qapi/schema.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
docs/sphinx/qapidoc.py +1 -1
index 54a32e45f7..31d09ed634 100644
@@ -512,7 +512,7 @@ def transmogrify(self, schema: QAPISchema) -> nodes.Element:
                 modules.add(module_source)
 
             if doc.symbol:
-                ent = schema.lookup_entity(doc.symbol)
+                ent = schema.lookup_defn(doc.symbol)
                 assert isinstance(ent, QAPISchemaDefinition)
                 vis.visit_entity(ent)
             else:
scripts/qapi/schema.py +3 -3
index 8d88b40de2..9c9e257a8f 100644
@@ -1184,11 +1184,11 @@ def _def_definition(self, defn: QAPISchemaDefinition) -> None:
                 defn.info, "%s is already defined" % other_defn.describe())
         self._entity_dict[defn.name] = defn
 
-    def lookup_entity(self, name: str) -> Optional[QAPISchemaEntity]:
+    def lookup_defn(self, name: str) -> Optional[QAPISchemaDefinition]:
         return self._entity_dict.get(name)
 
     def lookup_type(self, name: str) -> Optional[QAPISchemaType]:
-        typ = self.lookup_entity(name)
+        typ = self.lookup_defn(name)
         if isinstance(typ, QAPISchemaType):
             return typ
         return None
@@ -1324,7 +1324,7 @@ def _make_implicit_object_type(
             return None
         # See also QAPISchemaObjectTypeMember.describe()
         name = 'q_obj_%s-%s' % (name, role)
-        typ = self.lookup_entity(name)
+        typ = self.lookup_defn(name)
         if typ:
             assert isinstance(typ, QAPISchemaObjectType)
             # The implicit object type has multiple users.  This can
Signature · 1 line
2.55.0
#2 lore raw

RFC PATCH 2/6 qapi: Ease access to introspection names

In reply to Markus Armbruster

query-qmp-schema masks type names, because they are not part of the external interface. Marc-André Lureau would like to also use them with qom-list & friends. Trouble is the masked names are buried deep in QAPISchemaGenIntrospectVisitor. Lift them into schema.py: new QAPISchemaDefinition method introspection_name() returns a definition's name for use in introspection.

---
 scripts/qapi/introspect.py | 23 ++++----------------
 scripts/qapi/schema.py     | 43 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 19 deletions(-)
scripts/qapi/introspect.py +4 -19
index 7e28de2279..644461560c 100644
@@ -30,7 +30,6 @@
     QAPISchemaAlternatives,
     QAPISchemaArrayType,
     QAPISchemaBranches,
-    QAPISchemaBuiltinType,
     QAPISchemaEntity,
     QAPISchemaEnumMember,
     QAPISchemaFeature,
@@ -177,7 +176,6 @@ def __init__(self, prefix: str, unmask: bool):
         self._schema: Optional[QAPISchema] = None
         self._trees: List[Annotated[SchemaInfo]] = []
         self._used_types: List[QAPISchemaType] = []
-        self._name_map: Dict[str, str] = {}
         self._genc.add(mcgen('''
 #include "qemu/osdep.h"
 #include "%(prefix)sqapi-introspect.h"
@@ -208,18 +206,14 @@ def visit_end(self) -> None:
         self._schema = None
         self._trees = []
         self._used_types = []
-        self._name_map = {}
 
     def visit_needed(self, entity: QAPISchemaEntity) -> bool:
         # Ignore types on first pass; visit_end() will pick up used types
         return not isinstance(entity, QAPISchemaType)
 
     def _name(self, name: str) -> str:
-        if self._unmask:
-            return name
-        if name not in self._name_map:
-            self._name_map[name] = '%d' % len(self._name_map)
-        return self._name_map[name]
+        assert self._schema
+        return self._schema.definition_introspection_name(name, self._unmask)
 
     def _use_type(self, typ: QAPISchemaType) -> str:
         assert self._schema is not None
@@ -237,13 +231,6 @@ def _use_type(self, typ: QAPISchemaType) -> str:
         # Add type to work queue if new
         if typ not in self._used_types:
             self._used_types.append(typ)
-        # Clients should examine commands and events, not types.  Hide
-        # type names as integers to reduce the temptation.  Also, it
-        # saves a few characters on the wire.
-        if isinstance(typ, QAPISchemaBuiltinType):
-            return typ.name
-        if isinstance(typ, QAPISchemaArrayType):
-            return '[' + self._use_type(typ.element_type) + ']'
         return self._name(typ.name)
 
     @staticmethod
@@ -271,8 +258,7 @@ def _gen_tree(self, name: str, mtype: str, obj: Dict[str, object],
                 # Output a comment to make it easy to map masked names
                 # back to the source when reading the generated output.
                 comment = f'"{self._name(name)}" = {name}'
-            name = self._name(name)
-        obj['name'] = name
+        obj['name'] = self._name(name)
         obj['meta-type'] = mtype
         if features:
             obj['features'] = self._gen_features(features)
@@ -327,8 +313,7 @@ def visit_array_type(self, name: str, info: Optional[QAPISourceInfo],
                          ifcond: QAPISchemaIfCond,
                          element_type: QAPISchemaType) -> None:
         element = self._use_type(element_type)
-        self._gen_tree('[' + element + ']', 'array', {'element-type': element},
-                       ifcond)
+        self._gen_tree(name, 'array', {'element-type': element}, ifcond)
 
     def visit_object_type_flat(self, name: str, info: Optional[QAPISourceInfo],
                                ifcond: QAPISchemaIfCond,
scripts/qapi/schema.py +43 -0

85 lines not on this page · raw message

Signature · 1 line
2.55.0
#3 lore raw

RFC PATCH 3/6 qapi/introspect: Simplify masked name comment emission slighly

In reply to Markus Armbruster

Instead of emitting the comment for certain meta-types, simply emit it when introspection name and name differ.

This additionally emits it for arrays, which is fine.

---
 scripts/qapi/introspect.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
scripts/qapi/introspect.py +6 -6
index 644461560c..49d1ed2897 100644
@@ -253,12 +253,12 @@ def _gen_tree(self, name: str, mtype: str, obj: Dict[str, object],
                          Will be omitted from the output if empty.
         """
         comment: Optional[str] = None
-        if mtype not in ('command', 'event', 'builtin', 'array'):
-            if not self._unmask:
-                # Output a comment to make it easy to map masked names
-                # back to the source when reading the generated output.
-                comment = f'"{self._name(name)}" = {name}'
-        obj['name'] = self._name(name)
+        introspection_name = self._name(name)
+        if introspection_name != name:
+            # Output a comment to make it easy to map masked names
+            # back to the source when reading the generated output.
+            comment = f'"{introspection_name}" = {name}'
+        obj['name'] = introspection_name
         obj['meta-type'] = mtype
         if features:
             obj['features'] = self._gen_features(features)
Signature · 1 line
2.55.0
#4 lore raw

RFC PATCH 4/6 qapi/introspect: Don't elide types

In reply to Markus Armbruster

query-qmp-schema elides types not reachable from commands and events. It currently emits 1251 out of 1385 definitions, and elides 134 types. Whether that's worthwhile is debatable.

Marc-André Lureau would like to make QOM introspection (qom-list & friends) refer to QAPI types. We additionally need types reachable from QOM properties.

Unfortunately, the QAPI generator knows nothing about QOM properties.

We could manually mark the QAPI types to elide, or the QAPI types not to elide even though they are not reachable from commands and events. Feels very much not worthwhile to me.

We could conservatively approximate "reachable from QOM properties" by "available for use with QOM properties". These are the built-in and user-defined types, and their arrays. With that, we'd elide just 38 out of 1385 definitions. Too few to be worthwhile.

Simply emit everything.

Output of query-qmp-schema grows from 247KiB to 274KiB for me.

---
 scripts/qapi/introspect.py | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)
scripts/qapi/introspect.py +4 -27
index 49d1ed2897..15302ecf15 100644
@@ -28,9 +28,7 @@
 from .schema import (
     QAPISchema,
     QAPISchemaAlternatives,
-    QAPISchemaArrayType,
     QAPISchemaBranches,
-    QAPISchemaEntity,
     QAPISchemaEnumMember,
     QAPISchemaFeature,
     QAPISchemaIfCond,
@@ -175,7 +173,6 @@ def __init__(self, prefix: str, unmask: bool):
         self._unmask = unmask
         self._schema: Optional[QAPISchema] = None
         self._trees: List[Annotated[SchemaInfo]] = []
-        self._used_types: List[QAPISchemaType] = []
         self._genc.add(mcgen('''
 #include "qemu/osdep.h"
 #include "%(prefix)sqapi-introspect.h"
@@ -187,10 +184,6 @@ def visit_begin(self, schema: QAPISchema) -> None:
         self._schema = schema
 
     def visit_end(self) -> None:
-        # visit the types that are actually used
-        for typ in self._used_types:
-            typ.visit(self)
-        # generate C
         name = c_name(self._prefix, protect=False) + 'qmp_schema_qlit'
         self._genh.add(mcgen('''
 #include "qobject/qlit.h"
@@ -205,32 +198,12 @@ def visit_end(self) -> None:
                              c_string=_tree_to_qlit(self._trees)))
         self._schema = None
         self._trees = []
-        self._used_types = []
-
-    def visit_needed(self, entity: QAPISchemaEntity) -> bool:
-        # Ignore types on first pass; visit_end() will pick up used types
-        return not isinstance(entity, QAPISchemaType)
 
     def _name(self, name: str) -> str:
         assert self._schema
         return self._schema.definition_introspection_name(name, self._unmask)
 
     def _use_type(self, typ: QAPISchemaType) -> str:
-        assert self._schema is not None
-
-        # Map the various integer types to plain int
-        if typ.json_type() == 'int':
-            type_int = self._schema.lookup_type('int')
-            assert type_int
-            typ = type_int
-        elif (isinstance(typ, QAPISchemaArrayType) and
-              typ.element_type.json_type() == 'int'):
-            type_intlist = self._schema.lookup_type('intList')
-            assert type_intlist
-            typ = type_intlist
-        # Add type to work queue if new
-        if typ not in self._used_types:
-            self._used_types.append(typ)
         return self._name(typ.name)
 
     @staticmethod
@@ -295,6 +268,8 @@ def _gen_variant(self, variant: QAPISchemaVariant
 
     def visit_builtin_type(self, name: str, info: Optional[QAPISourceInfo],
                            json_type: str) -> None:
+        if json_type == 'int' and name != 'int':
+            return
         self._gen_tree(name, 'builtin', {'json-type': json_type})
 
     def visit_enum_type(self, name: str, info: Optional[QAPISourceInfo],
@@ -312,6 +287,8 @@ def visit_enum_type(self, name: str, info: Optional[QAPISourceInfo],
     def visit_array_type(self, name: str, info: Optional[QAPISourceInfo],
                          ifcond: QAPISchemaIfCond,
                          element_type: QAPISchemaType) -> None:
+        if element_type.json_type() == 'int' and name != 'intList':
+            return
         element = self._use_type(element_type)
         self._gen_tree(name, 'array', {'element-type': element}, ifcond)
 
Signature · 1 line
2.55.0
#5 lore raw

RFC PATCH 5/6 qapi: QAPISchemaVisitor.visit_needed() is now unused, drop

In reply to Markus Armbruster
---
 scripts/qapi/schema.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
scripts/qapi/schema.py +1 -7
index 11f3accec8..9e2152fa41 100644
@@ -179,11 +179,6 @@ def visit_end(self) -> None:
     def visit_module(self, name: str) -> None:
         pass
 
-    def visit_needed(self, entity: QAPISchemaEntity) -> bool:
-        # pylint: disable=unused-argument
-        # Default to visiting everything
-        return True
-
     def visit_include(self, name: str, info: Optional[QAPISourceInfo]) -> None:
         pass
 
@@ -315,8 +310,7 @@ def add_entity(self, ent: QAPISchemaEntity) -> None:
     def visit(self, visitor: QAPISchemaVisitor) -> None:
         visitor.visit_module(self.name)
         for entity in self._entity_list:
-            if visitor.visit_needed(entity):
-                entity.visit(visitor)
+            entity.visit(visitor)
 
 
 class QAPISchemaInclude(QAPISchemaEntity):
Signature · 1 line
2.55.0
#6 lore raw

RFC PATCH 6/6 qapi/introspect: Tweak integer type masking

In reply to Markus Armbruster

Since introspection maps all integer types to 'int', we need to skip all but one of them. Instead of filtering by hardcoded name, filter out duplicates.

---
 scripts/qapi/introspect.py | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
scripts/qapi/introspect.py +10 -8
index 15302ecf15..dc6f70a6fe 100644
@@ -172,7 +172,7 @@ def __init__(self, prefix: str, unmask: bool):
             ' * QAPI/QMP schema introspection', __doc__)
         self._unmask = unmask
         self._schema: Optional[QAPISchema] = None
-        self._trees: List[Annotated[SchemaInfo]] = []
+        self._trees: Dict[str, Annotated[SchemaInfo]] = {}
         self._genc.add(mcgen('''
 #include "qemu/osdep.h"
 #include "%(prefix)sqapi-introspect.h"
@@ -191,13 +191,14 @@ def visit_end(self) -> None:
 extern const QLitObject %(c_name)s;
 ''',
                              c_name=c_name(name)))
+        trees = list(self._trees.values())
         self._genc.add(mcgen('''
 const QLitObject %(c_name)s = %(c_string)s;
 ''',
                              c_name=c_name(name),
-                             c_string=_tree_to_qlit(self._trees)))
+                             c_string=_tree_to_qlit(trees)))
         self._schema = None
-        self._trees = []
+        self._trees = {}
 
     def _name(self, name: str) -> str:
         assert self._schema
@@ -235,7 +236,12 @@ def _gen_tree(self, name: str, mtype: str, obj: Dict[str, object],
         obj['meta-type'] = mtype
         if features:
             obj['features'] = self._gen_features(features)
-        self._trees.append(Annotated(obj, ifcond, comment))
+        if introspection_name in self._trees:
+            # Duplicates are possible because
+            # QAPISchemaBuiltinType.introspection_name() returns 'int'
+            # for all integer types.  Ignore them.
+            return
+        self._trees[introspection_name] = Annotated(obj, ifcond, comment)
 
     def _gen_enum_member(self, member: QAPISchemaEnumMember
                          ) -> Annotated[SchemaInfoEnumMember]:
@@ -268,8 +274,6 @@ def _gen_variant(self, variant: QAPISchemaVariant
 
     def visit_builtin_type(self, name: str, info: Optional[QAPISourceInfo],
                            json_type: str) -> None:
-        if json_type == 'int' and name != 'int':
-            return
         self._gen_tree(name, 'builtin', {'json-type': json_type})
 
     def visit_enum_type(self, name: str, info: Optional[QAPISourceInfo],
@@ -287,8 +291,6 @@ def visit_enum_type(self, name: str, info: Optional[QAPISourceInfo],
     def visit_array_type(self, name: str, info: Optional[QAPISourceInfo],
                          ifcond: QAPISchemaIfCond,
                          element_type: QAPISchemaType) -> None:
-        if element_type.json_type() == 'int' and name != 'intList':
-            return
         element = self._use_type(element_type)
         self._gen_tree(name, 'array', {'element-type': element}, ifcond)
 
Signature · 1 line
2.55.0
#7 lore raw
In reply to Markus Armbruster

Hi Markus

Quoted 9 lines · Markus Armbruster

Marc-André Lureau has patches to improve QOM introspection. Latest version is

    Subject: [PATCH v5 00/62] qom/qdev: associate properties with QAPI schema types
    Date: Fri, 11 Sep 2026 20:34:34 +0400
    Message-Id: <[email protected]>
    https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 8 lines

The first few patches make the QAPI code generator emit type information for use by QOM introspection commands. They refactor code to gain access to masked type names, and to make query-qmp-schema not elide types QOM introspection might want to refer to.

My series does this in a different way I find simpler. It is RFC because merging it only makes sense if Marc-André finds it useful. Marc-André, please have a look.

This is essentially doing the same introspection changes but at a different level. If you ask me, since it's essentially code cleanup at this point, I would rather merge my changes first and iterate on top. But you are the gate keeper, so I wouldn't hold it, we need to move on... I can rebase on top of your refactoring if you prefer.

Quoted 17 lines

Markus Armbruster (6):
qapi/schema: Rename .lookup_entity() and tighten return type
qapi: Ease access to introspection names qapi/introspect: Simplify masked name comment emission slighly qapi/introspect: Don't elide types
qapi: QAPISchemaVisitor.visit_needed() is now unused, drop qapi/introspect: Tweak integer type masking

 docs/sphinx/qapidoc.py     |  2 +-
 scripts/qapi/introspect.py | 74 ++++++++++----------------------------
 scripts/qapi/schema.py     | 57 +++++++++++++++++++++++------
 3 files changed, 67 insertions(+), 66 deletions(-)

--
2.55.0

#8 lore raw
Quoted 21 lines · Marc-André Lureau

Hi Markus

Quoted 9 lines · Markus Armbruster

Marc-André Lureau has patches to improve QOM introspection. Latest version is

    Subject: [PATCH v5 00/62] qom/qdev: associate properties with QAPI schema types
    Date: Fri, 11 Sep 2026 20:34:34 +0400
    Message-Id: <[email protected]>
    https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 8 lines

The first few patches make the QAPI code generator emit type information for use by QOM introspection commands. They refactor code to gain access to masked type names, and to make query-qmp-schema not elide types QOM introspection might want to refer to.

My series does this in a different way I find simpler. It is RFC because merging it only makes sense if Marc-André finds it useful. Marc-André, please have a look.

Quoted 5 lines

This is essentially doing the same introspection changes but at a different level. If you ask me, since it's essentially code cleanup at this point, I would rather merge my changes first and iterate on top. But you are the gate keeper, so I wouldn't hold it, we need to move on... I can rebase on top of your refactoring if you prefer.

A rebase gives me a cleaner git history, which I like. Asking you to do it feels a bit unfair, so I did it:

https://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qom-props-qapi-types-v5-rebased

I had to change "qapi: add type-infos generator" quite a bit (commit 465ae98da2). Slightly simpler now.

I resolved a rebase conflict in "qom: convert scalar properties to QAPI-aware registration".

I dropped "qapi: expose integer signedness and width in introspection" because I don't agree with it, and couldn't be bothered to resolve the conflict (iirc).

I dropped "qapi: select introspectable types directly", because it's not needed anymore.

#9 lore raw

Hi

Quoted 30 lines · Markus Armbruster
Quoted 21 lines · Marc-André Lureau

Hi Markus

Quoted 9 lines · Markus Armbruster

Marc-André Lureau has patches to improve QOM introspection. Latest version is

    Subject: [PATCH v5 00/62] qom/qdev: associate properties with QAPI schema types
    Date: Fri, 11 Sep 2026 20:34:34 +0400
    Message-Id: <[email protected]>
    https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 8 lines

The first few patches make the QAPI code generator emit type information for use by QOM introspection commands. They refactor code to gain access to masked type names, and to make query-qmp-schema not elide types QOM introspection might want to refer to.

My series does this in a different way I find simpler. It is RFC because merging it only makes sense if Marc-André finds it useful. Marc-André, please have a look.

Quoted 5 lines

This is essentially doing the same introspection changes but at a different level. If you ask me, since it's essentially code cleanup at this point, I would rather merge my changes first and iterate on top. But you are the gate keeper, so I wouldn't hold it, we need to move on... I can rebase on top of your refactoring if you prefer.

Quoted 4 lines

A rebase gives me a cleaner git history, which I like. Asking you to do it feels a bit unfair, so I did it:

https://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qom-props-qapi-types-v5-rebased

Awesome, I am happy with that! If you want to resubmit on ML or send PR, up to you

I think the only local change I had (with the collected review trailers), was BootCertificatesList conversion. But that can be a follow up.

Quoted 4 lines

I had to change "qapi: add type-infos generator" quite a bit (commit 465ae98da2). Slightly simpler now.
t

ok

Quoted 7 lines

I resolved a rebase conflict in "qom: convert scalar properties to QAPI-aware registration".

I dropped "qapi: expose integer signedness and width in introspection" because I don't agree with it, and couldn't be bothered to resolve the conflict (iirc).

Ok, let's discuss this separately

Quoted 3 lines

I dropped "qapi: select introspectable types directly", because it's not needed anymore.

#10 lore raw
Quoted 33 lines · Marc-André Lureau

Hi

Quoted 30 lines · Markus Armbruster
Quoted 26 lines · Marc-André Lureau

Hi Markus

Quoted 9 lines · Markus Armbruster

Marc-André Lureau has patches to improve QOM introspection. Latest version is

    Subject: [PATCH v5 00/62] qom/qdev: associate properties with QAPI schema types
    Date: Fri, 11 Sep 2026 20:34:34 +0400
    Message-Id: <[email protected]>
    https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 8 lines

The first few patches make the QAPI code generator emit type information for use by QOM introspection commands. They refactor code to gain access to masked type names, and to make query-qmp-schema not elide types QOM introspection might want to refer to.

My series does this in a different way I find simpler. It is RFC because merging it only makes sense if Marc-André finds it useful. Marc-André, please have a look.

This is essentially doing the same introspection changes but at a different level. If you ask me, since it's essentially code cleanup at this point, I would rather merge my changes first and iterate on top. But you are the gate keeper, so I wouldn't hold it, we need to move on... I can rebase on top of your refactoring if you prefer.

Quoted 7 lines
Quoted 4 lines

A rebase gives me a cleaner git history, which I like. Asking you to do it feels a bit unfair, so I did it:

https://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qom-props-qapi-types-v5-rebased

Awesome, I am happy with that! If you want to resubmit on ML or send PR, up to you

Great!

I'd like to have a closer look at a few more patches. They look harmless at a glance.

Quoted 3 lines

I think the only local change I had (with the collected review trailers), was BootCertificatesList conversion. But that can be a follow up.

Happy to squash it in, feel free to send me a delta, a revised patch, or something to git-fetch.

There's also a temporary test breakage in PATCH 15. Could you have a look?

[...]

#11 lore raw

Hi

Quoted 49 lines · Markus Armbruster
Quoted 33 lines · Marc-André Lureau

Hi

Quoted 30 lines · Markus Armbruster
Quoted 26 lines · Marc-André Lureau

Hi Markus

Quoted 9 lines · Markus Armbruster

Marc-André Lureau has patches to improve QOM introspection. Latest version is

    Subject: [PATCH v5 00/62] qom/qdev: associate properties with QAPI schema types
    Date: Fri, 11 Sep 2026 20:34:34 +0400
    Message-Id: <[email protected]>
    https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 8 lines

The first few patches make the QAPI code generator emit type information for use by QOM introspection commands. They refactor code to gain access to masked type names, and to make query-qmp-schema not elide types QOM introspection might want to refer to.

My series does this in a different way I find simpler. It is RFC because merging it only makes sense if Marc-André finds it useful. Marc-André, please have a look.

This is essentially doing the same introspection changes but at a different level. If you ask me, since it's essentially code cleanup at this point, I would rather merge my changes first and iterate on top. But you are the gate keeper, so I wouldn't hold it, we need to move on... I can rebase on top of your refactoring if you prefer.

Quoted 7 lines
Quoted 4 lines

A rebase gives me a cleaner git history, which I like. Asking you to do it feels a bit unfair, so I did it:

https://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qom-props-qapi-types-v5-rebased

Awesome, I am happy with that! If you want to resubmit on ML or send PR, up to you

Great!

I'd like to have a closer look at a few more patches. They look harmless at a glance.

Quoted 6 lines
Quoted 3 lines

I think the only local change I had (with the collected review trailers), was BootCertificatesList conversion. But that can be a follow up.

Happy to squash it in, feel free to send me a delta, a revised patch, or something to git-fetch.

commit ed3c302c506fc9de30a540f7ed8274e82baa295c

Author: Marc-André Lureau <[email protected]>
Date:   Wed Sep 23 14:32:43 2026 +0400

hw/s390x: convert BootCertificatesList to QAPI-aware registration

hw/s390x/s390-virtio-ccw.c +1 -0
index 9ca3b14442e1..97e122e3e7db 100644
@@ -44,6 +44,7 @@
 #include "target/s390x/kvm/pv.h"
 #include "migration/blocker.h"
 #include "qapi/qapi-builtin-type-infos.h"
+#include "qapi/qapi-type-infos-machine-s390x.h"
 #include "qapi/visitor.h"
 #include "qapi/qapi-visit-machine-s390x.h"
 #include "hw/s390x/cpu-topology.h"
@@ -918,8 +919,10 @@ static void ccw_machine_class_init(ObjectClass

*oc, const void *data)
" to upper case) to pass to machine loader, boot manager," " and guest kernel");

- object_class_property_add(oc, "boot-certs", "BootCertificatesList",
- machine_get_boot_certs,
machine_set_boot_certs, NULL, NULL);
+ object_class_property_add_qapi(oc, "boot-certs",

+                                   &BootCertificatesList_type_info,
+                                   machine_get_boot_certs,
+                                   machine_set_boot_certs, NULL, NULL);

object_class_property_set_description(oc, "boot-certs",
"provide paths to a directory and/or a certificate file
for secure boot");

Quoted 3 lines

There's also a temporary test breakage in PATCH 15. Could you have a look?

It needs a temporary non-QAPI local enum fixes, to set masked_name to some value.

Or simply rebase "hw/gpio/pca955x: use QAPI enums" & "hw/i386: convert PCSouthBridgeOption to QAPI enum" before that patch.

#12 lore raw

Thanks! I intend to post a v6 of your "qom/qdev: associate properties with QAPI schema types" today, then continue review there.