mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
migration: Add .save_prepare() handler to struct SaveVMHandlers
Add a new .save_prepare() handler to struct SaveVMHandlers. This handler is called early, even before migration starts, and can be used by devices to perform early checks. Refactor migrate_init() to be able to return errors and call .save_prepare() from there. Suggested-by: Peter Xu <peterx@redhat.com> Signed-off-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
committed by
Cédric Le Goater
parent
f543aa222d
commit
08fc4cb517
@@ -20,6 +20,11 @@ typedef struct SaveVMHandlers {
|
||||
/* This runs inside the iothread lock. */
|
||||
SaveStateHandler *save_state;
|
||||
|
||||
/*
|
||||
* save_prepare is called early, even before migration starts, and can be
|
||||
* used to perform early checks.
|
||||
*/
|
||||
int (*save_prepare)(void *opaque, Error **errp);
|
||||
void (*save_cleanup)(void *opaque);
|
||||
int (*save_live_complete_postcopy)(QEMUFile *f, void *opaque);
|
||||
int (*save_live_complete_precopy)(QEMUFile *f, void *opaque);
|
||||
|
||||
Reference in New Issue
Block a user