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] CI run: https://gitlab.com/farosas/qemu/-/pipelines/2262453042 Fabiano Rosas (5): 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 include/qapi/dealloc-visitor.h | 6 + include/qapi/type-helpers.h | 40 +++++ migration/options.c | 282 ++++----------------------------- qapi/qapi-dealloc-visitor.c | 173 +++++++++++++++++++- 4 files changed, 246 insertions(+), 255 deletions(-) -- 2.51.0
