migration: Clarify that {load, save}_cleanup handlers can run without setup
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
Tue, 4 Mar 2025 22:03:28 +0000 (23:03 +0100)
committerCédric Le Goater <clg@redhat.com>
Thu, 6 Mar 2025 05:47:33 +0000 (06:47 +0100)
commitd3237d0d85e9fba79b37c776b0ddda611c338f7d
treec7cd20be0089068f9a573e45a519185da9021e9b
parent8d8a30d1ac7cc9b35833106d749e1b3e8675bc53
migration: Clarify that {load, save}_cleanup handlers can run without setup

It's possible for {load,save}_cleanup SaveVMHandlers to get called without
the corresponding {load,save}_setup handler being called first.

One such example is if {load,save}_setup handler of a proceeding device
returns error.
In this case the migration core cleanup code will call all corresponding
cleanup handlers, even for these devices which haven't had its setup
handler called.

Since this behavior can generate some surprises let's clearly document it
in these SaveVMHandlers description.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Link: https://lore.kernel.org/qemu-devel/991636623fb780350f493b5f045cb17e13ce4c0f.1741124640.git.maciej.szmigiero@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
include/migration/register.h