]> git.proxmox.com Git - mirror_qemu.git/commit
migration: Add .save_prepare() handler to struct SaveVMHandlers
authorAvihai Horon <avihaih@nvidia.com>
Wed, 6 Sep 2023 15:08:51 +0000 (18:08 +0300)
committerCédric Le Goater <clg@redhat.com>
Mon, 11 Sep 2023 06:34:06 +0000 (08:34 +0200)
commit08fc4cb51774f763dcc6fd74637aa9e00eb6a0ba
treeaf484c052851ff7e63c56196b25ce40e95582db1
parentf543aa222da183ac37424d1ea3a65e5fb6202732
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>
include/migration/register.h
migration/migration.c
migration/migration.h
migration/savevm.c
migration/savevm.h