From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGVhk-0007PX-QP for qemu-devel@nongnu.org; Wed, 19 Oct 2011 08:57:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGVhi-0007pX-Ki for qemu-devel@nongnu.org; Wed, 19 Oct 2011 08:57:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGVhh-0007pD-Uy for qemu-devel@nongnu.org; Wed, 19 Oct 2011 08:57:06 -0400 From: Luiz Capitulino Date: Wed, 19 Oct 2011 10:56:50 -0200 Message-Id: <1319029011-11706-5-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1319029011-11706-1-git-send-email-lcapitulino@redhat.com> References: <1319029011-11706-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 4/5] savevm: qemu_savevm_state(): Drop stop VM logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-devel@nongnu.org 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: Michael Roth Reviewed-by: Kevin Wolf Reviewed-by: Juan Quintela Signed-off-by: Luiz Capitulino --- savevm.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/savevm.c b/savevm.c index bf4d0e7..abb4a60 100644 --- a/savevm.c +++ b/savevm.c @@ -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; } -- 1.7.7.rc3