return (a > b) - (a < b);
}
+int migration_stop_vm(RunState state)
+{
+ return vm_stop_force_state(state);
+}
+
void migration_object_init(void)
{
/* This can only be called once. */
qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER, NULL);
global_state_store();
- ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
+ ret = migration_stop_vm(RUN_STATE_FINISH_MIGRATE);
if (ret < 0) {
goto fail;
}
s->vm_old_state = runstate_get();
global_state_store();
- ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
+ ret = migration_stop_vm(RUN_STATE_FINISH_MIGRATE);
trace_migration_completion_vm_stop(ret);
if (ret < 0) {
goto out_unlock;
global_state_store();
/* Forcibly stop VM before saving state of vCPUs and devices */
- if (vm_stop_force_state(RUN_STATE_PAUSED)) {
+ if (migration_stop_vm(RUN_STATE_PAUSED)) {
goto fail;
}
/*