All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] qapi: Use visitors for migration parameters handling
@ 2026-02-02 22:40 Fabiano Rosas
  2026-02-02 22:40 ` [PATCH v2 1/9] migration/options.c: Don't export migrate_tls_opts_free Fabiano Rosas
                   ` (9 more replies)
  0 siblings, 10 replies; 28+ messages in thread
From: Fabiano Rosas @ 2026-02-02 22:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: peterx, armbru, ppandit

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/20260114132309.5832-1-farosas@suse.de

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/20251215220041.12657-1-farosas@suse.de

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(-)

-- 
2.51.0



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2026-02-13 14:58 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 22:40 [PATCH v2 0/9] qapi: Use visitors for migration parameters handling Fabiano Rosas
2026-02-02 22:40 ` [PATCH v2 1/9] migration/options.c: Don't export migrate_tls_opts_free Fabiano Rosas
2026-02-05 20:19   ` Peter Xu
2026-02-02 22:40 ` [PATCH v2 2/9] migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply Fabiano Rosas
2026-02-05 20:19   ` Peter Xu
2026-02-02 22:40 ` [PATCH v2 3/9] migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply Fabiano Rosas
2026-02-02 22:40 ` [PATCH v2 4/9] qapi: Implement qapi_dealloc_present_visitor Fabiano Rosas
2026-02-05 21:45   ` Peter Xu
2026-02-06 12:19     ` Fabiano Rosas
2026-02-06 17:38       ` Peter Xu
2026-02-02 22:40 ` [PATCH v2 5/9] qapi: Add QAPI_MERGE Fabiano Rosas
2026-02-13 14:57   ` Markus Armbruster
2026-02-02 22:40 ` [PATCH v2 6/9] migration/options: Use QAPI_MERGE in migrate_params_test_apply Fabiano Rosas
2026-02-02 22:40 ` [PATCH v2 7/9] migration/options: Open code migrate_params_apply Fabiano Rosas
2026-02-05 22:14   ` Peter Xu
2026-02-06 12:25     ` Fabiano Rosas
2026-02-02 22:41 ` [PATCH v2 8/9] migration/options: Stop freeing s->parameters members individually Fabiano Rosas
2026-02-05 22:16   ` Peter Xu
2026-02-06 12:29     ` Fabiano Rosas
2026-02-06 16:20       ` Peter Xu
2026-02-06 19:50         ` Fabiano Rosas
2026-02-09 15:37           ` Peter Xu
2026-02-02 22:41 ` [PATCH v2 9/9] migration: Use migrate_params_free during finalize Fabiano Rosas
2026-02-05 22:21   ` Peter Xu
2026-02-05 22:05 ` [PATCH v2 0/9] qapi: Use visitors for migration parameters handling Peter Xu
2026-02-06 12:34   ` Fabiano Rosas
2026-02-06 17:40     ` Peter Xu
2026-02-06 18:36       ` Fabiano Rosas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.