mbox series

[0/2] Migration: Make misc.h helpers available for whole VM lifecycle

Message ID 20241022160720.1013543-1-peterx@redhat.com (mailing list archive)
Headers show
Series Migration: Make misc.h helpers available for whole VM lifecycle | expand

Message

Peter Xu Oct. 22, 2024, 4:07 p.m. UTC
This is a follow up of below patch from Avihai as a replacement:

https://lore.kernel.org/qemu-devel/20241020130108.27148-3-avihaih@nvidia.com/

It allows all misc.h exported helpers to be used for the whole VM
lifecycle, so as to never crash QEMU with freed migration objects.

I did also add some comments explaining lock requirements for using the
helpers, which used to be ambiguous.  Hopefully that clarify things too.

Thanks,

Peter Xu (2):
  migration: Make all helpers in misc.h safe to use without migration
  migration: Unexport dirty_bitmap_mig_init() in misc.h

 include/migration/misc.h | 36 ++++++++++++++++++++++++++++--------
 migration/migration.h    |  4 ++++
 migration/migration.c    | 22 +++++++++++++++++++++-
 3 files changed, 53 insertions(+), 9 deletions(-)