mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
migration: Switch to COLO process after finishing loadvm
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. We add three new members to struct MigrationIncomingState, 'have_colo_incoming_thread' and 'colo_incoming_thread' record the COLO related thread for secondary VM, 'migration_incoming_co' records the original migration incoming coroutine. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit@amitshah.net>
This commit is contained in:
parent
0b827d5e72
commit
25d0c16f62
6 changed files with 67 additions and 0 deletions
|
@ -49,3 +49,13 @@ void colo_info_init(void)
|
|||
{
|
||||
vmstate_register(NULL, 0, &colo_state, &colo_info);
|
||||
}
|
||||
|
||||
bool migration_incoming_enable_colo(void)
|
||||
{
|
||||
return colo_info.colo_requested;
|
||||
}
|
||||
|
||||
void migration_incoming_exit_colo(void)
|
||||
{
|
||||
colo_info.colo_requested = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue