提交 c370f09d 编写于 作者: L Luiz Capitulino

savevm: qemu_savevm_state(): Drop stop VM logic

qemu_savevm_state() has some logic to stop the VM and to (or not to)
resume it. But this seems to be a big noop, as qemu_savevm_state()
is only called by do_savevm() when the VM is already stopped.

So, let's drop qemu_savevm_state()'s stop VM logic.
Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 ee21cb5f
......@@ -1599,12 +1599,8 @@ void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f)
static int qemu_savevm_state(Monitor *mon, QEMUFile *f)
{
int saved_vm_running;
int ret;
saved_vm_running = runstate_is_running();
vm_stop(RUN_STATE_SAVE_VM);
if (qemu_savevm_state_blocked(mon)) {
ret = -EINVAL;
goto out;
......@@ -1626,9 +1622,6 @@ out:
if (qemu_file_has_error(f))
ret = -EIO;
if (!ret && saved_vm_running)
vm_start();
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册