qapi: Use visitors for migration parameters handling
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest9 patches 18 repliesIn review
- v15 patches 15 repliesSuperseded
v1 from the cover letter
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | migration/options.c: Don't export migrate_tls_opts_freemigration/ migration/ | +1 | 1 reply | |
| 2/9 | migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_applymigration/ | +12 | 1 reply | |
| 3/9 | migration: Use QAPI_CLONE_MEMBERS in migrate_params_applymigration/ | +14 | 0 replies | |
| 4/9 | qapi: Implement qapi_dealloc_present_visitorinclude/ qapi/ | +178 | 3 replies | |
| 5/9 | qapi: Add QAPI_MERGEinclude/ | +40 | 1 reply | |
| 6/9 | migration/options: Use QAPI_MERGE in migrate_params_test_applymigration/ | +10 | 0 replies | |
| 7/9 | migration/options: Open code migrate_params_applymigration/ | +14 | 2 replies | |
| 8/9 | migration/options: Stop freeing s->parameters members individuallymigration/ | +17 | 5 replies | |
| 9/9 | migration: Use migrate_params_free during finalizemigration/ migration/ migration/ | +6 | 1 reply |
Reviews trailers per patch
8 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Peter Xu | Prasad Pandit |
|---|---|---|
| 1/9 | R-b | |
| 2/9 | R-b | |
| 3/9 | R-b | R-b |
| 4/9 | ||
| 5/9 | A-b | |
| 6/9 | R-b | |
| 7/9 | R-b | |
| 8/9 | R-b | |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/9] qapi: Use visitors for migration parameters handling
Hi, just a few more patches until options.c is fully using QAPI_CLONE instead of open-coding options handling, we're almost there.
In this v2:
- [NEW] patch 1/9 - Cleanup of a previous mistake.
- Properly freeing ptr members in patch 2/9 as spotted by Peter.
- Moved has_block_bitmap_mapping=true from patch 2 to patch 3.
- [NEW] patch 7/9 - Prasad's suggestion to keep the entire process of applying parameters in one place.
- [NEW] patch 8/9 - Replaced calls to qapi_free_* with qapi_dealloc_visitor.
- [NEW] patch 9/9 - Used the new migrate_params_free() for the instance finalize as well.
CI run: https://gitlab.com/farosas/qemu/-/pipelines/2301775498
v1:
https://lore.kernel.org/r/[email protected]
I split this series from the original[0] because these changes are more QAPI-related and self-contained.
The idea is to use QAPI_CLONE_MEMBERS and (the new) QAPI_MERGE to reduce the amount of open-coded parameters handling in options.c, such as checks to QAPI's has_* fields and manual inclusion of future parameters.
- Patches 1 & 2 are unchanged
- Patch 3 adds a new variant of the dealloc visitor to free the to-be unreferenced memory when the input visitor eventually allocates new memory and overwrites the pointers.
- Patches 4 & 5 are mostly unchanged, but now use the new visitor.
0 - migration: Unify capabilities and parameters
https://lore.kernel.org/r/[email protected]
Fabiano Rosas (9):
migration/options.c: Don't export migrate_tls_opts_free
migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply
migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply
qapi: Implement qapi_dealloc_present_visitor
qapi: Add QAPI_MERGE
migration/options: Use QAPI_MERGE in migrate_params_test_apply migration/options: Open code migrate_params_apply migration/options: Stop freeing s->parameters members individually
migration: Use migrate_params_free during finalize
include/qapi/dealloc-visitor.h | 6 + include/qapi/type-helpers.h | 40 +++++ migration/migration.c | 3 +- migration/options.c | 304 ++++----------------------------- migration/options.h | 2 +- qapi/qapi-dealloc-visitor.c | 173 ++++++++++++++++++- 6 files changed, 257 insertions(+), 271 deletions(-)
Signature · 1 line
2.51.0