aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2024-01-03 12:05:35 -0800
committerPeter Xu <peterx@redhat.com>2024-01-04 09:52:42 +0800
commitb4e9ddccd1a64239c07d7229afd7e00eed5afcd8 (patch)
treeb3494deeace2730b48ba2e4b555bcf54f08e8b97 /system
parentd3c86c99f36ac37a92dd40191b9571c0d12d415a (diff)
migration: preserve suspended runstate
A guest that is migrated in the suspended state automaticaly wakes and continues execution. This is wrong; the guest should end migration in the same state it started. The root cause is that the outgoing migration code automatically wakes the guest, then saves the RUNNING runstate in global_state_store(), hence the incoming migration code thinks the guest is running and continues the guest if autostart is true. On the outgoing side, delete the call to qemu_system_wakeup_request(). Now that vm_stop completely stops a vm in the suspended state (from the preceding patches), the existing call to vm_stop_force_state is sufficient to correctly migrate all vmstate. On the incoming side, call vm_start if the pre-migration state was running or suspended. For the latter, vm_start correctly restores the suspended state, and a future system_wakeup monitor request will cause the vm to resume running. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/1704312341-66640-7-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'system')
0 files changed, 0 insertions, 0 deletions