qapi/qom: QAPIfy --object and object-add
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest30 patches 47 repliesIn review
- v231 patches 50 repliesSuperseded
- v118 patches 41 repliesSuperseded
Changes in v3 from the cover letter
- Removed now useless QAuthZListRuleListHack
- Made some more ObjectOptions branches conditional
- Improved documentation for some properties
- Fixed 'qemu-img compare' exit code for option parsing failure
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/30 | qapi/qom: Drop deprecated 'props' from object-adddocs/ docs/ qapi/ +1 more | +6 | 0 replies | |
| 2/30 | qapi/qom: Add ObjectOptions for iothreadqapi/ | +53 | 0 replies | |
| 3/30 | qapi/qom: Add ObjectOptions for authz-*qapi/ qapi/ storage-daemon/ | +67 | 1 reply | |
| 4/30 | qapi/qom: Add ObjectOptions for cryptodev-*qapi/ | +35 | 1 reply | |
| 5/30 | qapi/qom: Add ObjectOptions for dbus-vmstateqapi/ | +18 | 0 replies | |
| 6/30 | qapi/qom: Add ObjectOptions for memory-backend-*qapi/ qapi/ qapi/ | +141 | 1 reply | |
| 7/30 | qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened'docs/ qapi/ | +63 | 0 replies | |
| 8/30 | qapi/qom: Add ObjectOptions for throttle-groupqapi/ qapi/ | +32 | 0 replies | |
| 9/30 | qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'docs/ qapi/ qapi/ | +77 | 1 reply | |
| 10/30 | qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'qapi/ qapi/ | +108 | 1 reply | |
| 11/30 | qapi/qom: Add ObjectOptions for can-*qapi/ | +18 | 0 replies | |
| 12/30 | qapi/qom: Add ObjectOptions for colo-compareqapi/ | +49 | 0 replies | |
| 13/30 | qapi/qom: Add ObjectOptions for filter-*qapi/ qapi/ qapi/ | +163 | 0 replies | |
| 14/30 | qapi/qom: Add ObjectOptions for pr-manager-helperqapi/ | +14 | 0 replies | |
| 15/30 | qapi/qom: Add ObjectOptions for confidential-guest-supportqapi/ | +37 | 0 replies | |
| 16/30 | qapi/qom: Add ObjectOptions for input-*qapi/ qapi/ qapi/ | +72 | 0 replies | |
| 17/30 | qapi/qom: Add ObjectOptions for x-remote-objectqapi/ | +18 | 0 replies | |
| 18/30 | qapi/qom: QAPIfy object-addhw/ include/ monitor/ +3 more | +32 | 0 replies | |
| 19/30 | qom: Make "object" QemuOptsList optionalqom/ | +5 | 0 replies | |
| 20/30 | qemu-storage-daemon: Implement --object with qmp_object_add()storage-daemon/ | +10 | 0 replies | |
| 21/30 | qom: Remove user_creatable_add_dict()include/ qom/ | +0 | 0 replies | |
| 22/30 | qom: Factor out user_creatable_process_cmdline()include/ qom/ qom/ +1 more | +80 | 3 replies | |
| 23/30 | qemu-io: Use user_creatable_process_cmdline() for --objectqemu-io.c | +3 | 0 replies | |
| 24/30 | qemu-nbd: Use user_creatable_process_cmdline() for --objectqemu-nbd.c | +3 | 0 replies | |
| 25/30 | qom: Add user_creatable_add_from_str()include/ qom/ | +40 | 0 replies | |
| 26/30 | qemu-img: Use user_creatable_process_cmdline() for --objectqemu-img.c | +45 | 7 replies | |
| 27/30 | hmp: QAPIfy object_addhmp-commands.hx monitor/ qom/ | +9 | 6 replies | |
| 28/30 | qom: Add user_creatable_parse_str()include/ qom/ | +29 | 0 replies | |
| 29/30 | vl: QAPIfy -objectsoftmmu/ | +84 | 1 reply | |
| 30/30 | qom: Drop QemuOpts based interfacesinclude/ qom/ tests/ | +20 | 0 replies |
Reviews trailers per patch
All 30 patches have a Reviewed-by or Acked-by.
| Patch | Peter Krempa | Eric Blake | Dr. David Alan Gilbert | Daniel P. Berrangé |
|---|---|---|---|---|
| 1/30 | A-b | R-b | ||
| 2/30 | A-b | R-b | ||
| 3/30 | A-b | R-b | A-b | |
| 4/30 | A-b | R-b | ||
| 5/30 | A-b | R-b | ||
| 6/30 | A-b | R-b | ||
| 7/30 | A-b | R-b | ||
| 8/30 | A-b | R-b | ||
| 9/30 | A-b | R-b | A-b | |
| 10/30 | A-b | R-b | A-b | |
| 11/30 | A-b | R-b | ||
| 12/30 | A-b | R-b | ||
| 13/30 | A-b | R-b | ||
| 14/30 | A-b | R-b | ||
| 15/30 | A-b | R-b | ||
| 16/30 | A-b | R-b | ||
| 17/30 | A-b | R-b | ||
| 18/30 | A-b | R-b | ||
| 19/30 | A-b | R-b | ||
| 20/30 | A-b | R-b | ||
| 21/30 | A-b | R-b | ||
| 22/30 | A-b | R-b | ||
| 23/30 | A-b | R-b | ||
| 24/30 | A-b | R-b | ||
| 25/30 | A-b | R-b | ||
| 26/30 | A-b | R-b | ||
| 27/30 | A-b | R-b | R-b | |
| 28/30 | A-b | R-b | ||
| 29/30 | A-b | R-b | ||
| 30/30 | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add
This series adds a QAPI type for the properties of all user creatable QOM types and finally makes the --object command line option (in all binaries) and the object-add monitor commands (in QMP and HMP) use the new ObjectOptions union.
This change improves things in more than just one way:
1. Documentation for QOM object types has always been lacking. Adding the schema, we get documentation for every property.
2. It prevents bugs by performing parts of the input validation (e.g. checking presence of mandatory properties) already in QAPI instead of relying on separate manual implementations in each class.
3. It provides QAPI introspection for user creatable objects.
4. Non-scalar properties are now supported everywhere because the command line parsers (including HMP) use the keyval parser now.
If you are in the CC list and didn't expect this series, it's probably because you're the maintainer of one of the objects for which I'm adding a QAPI schema description. Please just have a look at the specific patch for your object and check whether the schema and its documentation make sense to you. You can ignore all other patches.
In a next step after this series, we can add make use of the QAPI structs in the implementation of the object and separate their configuration from the runtime state. Specifically, the plan is to add a .configure() callback to ObjectClass that allows configuring the object in one place at creation time and keeping QOM property setters only for properties that can actually be changed at runtime. Paolo made an example of what the state could look like after this:
https://wiki.qemu.org/Features/QOM-QAPI_integration
Finally, the intention is to extend the QAPI schema to have separate 'object' entities and generate some of the code that was written manually in the intermediate state before.
This series is available as a git tag at:
https://repo.or.cz/qemu/kevin.git qapi-object-v3
v3:
- Removed now useless QAuthZListRuleListHack
- Made some more ObjectOptions branches conditional
- Improved documentation for some properties
- Fixed 'qemu-img compare' exit code for option parsing failure
v2:
- Convert not only object-add, but all external interfaces so that the schema will always be enforced and mismatch between implementation and schema can't go unnoticed.
- Rebased, covering properties and object types added since v1 (yes, things do become outdated rather quickly when you touch all user creatable objects)
- Changed the "Since:" version number in the schema documentation to refer to the version when the object was introduced rather than 6.0 where the schema will (hopefully) be added
- Probably some other minor changes
Kevin Wolf (30):
qapi/qom: Drop deprecated 'props' from object-add qapi/qom: Add ObjectOptions for iothread
qapi/qom: Add ObjectOptions for authz-*
qapi/qom: Add ObjectOptions for cryptodev-* qapi/qom: Add ObjectOptions for dbus-vmstate qapi/qom: Add ObjectOptions for memory-backend-* qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened' qapi/qom: Add ObjectOptions for throttle-group qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded' qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded' qapi/qom: Add ObjectOptions for can-*
qapi/qom: Add ObjectOptions for colo-compare qapi/qom: Add ObjectOptions for filter-*
qapi/qom: Add ObjectOptions for pr-manager-helper qapi/qom: Add ObjectOptions for confidential-guest-support qapi/qom: Add ObjectOptions for input-*
qapi/qom: Add ObjectOptions for x-remote-object qapi/qom: QAPIfy object-add
qom: Make "object" QemuOptsList optional
qemu-storage-daemon: Implement --object with qmp_object_add()
qom: Remove user_creatable_add_dict()
qom: Factor out user_creatable_process_cmdline()
qemu-io: Use user_creatable_process_cmdline() for --object
qemu-nbd: Use user_creatable_process_cmdline() for --object
qom: Add user_creatable_add_from_str()
qemu-img: Use user_creatable_process_cmdline() for --object
hmp: QAPIfy object_add
qom: Add user_creatable_parse_str()
vl: QAPIfy -object
qom: Drop QemuOpts based interfaces
qapi/authz.json | 61 ++- qapi/block-core.json | 27 ++ qapi/common.json | 52 +++ qapi/crypto.json | 159 +++++++ qapi/machine.json | 22 +- qapi/net.json | 20 - qapi/qom.json | 644 ++++++++++++++++++++++++++- qapi/ui.json | 13 +- docs/system/deprecated.rst | 25 +- docs/system/removed-features.rst | 5 + include/qom/object_interfaces.h | 106 ++--- hw/block/xen-block.c | 16 +- monitor/hmp-cmds.c | 17 +- monitor/misc.c | 2 - qemu-img.c | 251 ++--------- qemu-io.c | 33 +- qemu-nbd.c | 34 +- qom/object_interfaces.c | 168 +++---- qom/qom-qmp-cmds.c | 28 +- softmmu/vl.c | 109 +++-- storage-daemon/qemu-storage-daemon.c | 27 +- tests/check-qom-proplist.c | 42 +- hmp-commands.hx | 2 +- storage-daemon/qapi/qapi-schema.json | 1 + 24 files changed, 1231 insertions(+), 633 deletions(-)
Signature · 1 line
2.29.2