qemu/include/migration
Dr. David Alan Gilbert 892ae715b6 migration: Cleanup during exit
Currently we cleanup the migration object as we exit main after the
main_loop finishes; however if there's a migration running things
get messy and we can end up with the migration thread still trying
to access freed structures.

We now take a ref to the object around the migration thread itself,
so the act of dropping the ref during exit doesn't cause us to lose
the state until the thread quits.

Cancelling the migration during migration also tries to get the thread
to quit.

We do this a bit earlier; so hopefully migration gets out of the way
before all the devices etc are freed.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20190227164900.16378-1-dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-03-06 10:49:17 +00:00
..
blocker.h migration: Create migration/blocker.h 2017-05-17 12:04:59 +02:00
colo.h COLO: Remove colo_state migration struct 2018-10-19 11:15:03 +08:00
cpu.h migration: Add VMSTATE_UINTTL_2DARRAY() 2017-05-04 09:39:01 +09:00
failover.h Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
global_state.h Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
misc.h migration: Cleanup during exit 2019-03-06 10:49:17 +00:00
qemu-file-types.h migration: Split qemu-file.h 2017-06-01 18:49:22 +02:00
register.h vmstate: constify SaveVMHandlers 2019-01-23 15:51:47 +00:00
snapshot.h migration: Create include for migration snapshots 2017-06-01 18:49:23 +02:00
vmstate.h migration: Add a VMSTATE_BOOL_TEST() macro 2019-02-27 21:06:08 -06:00