From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RERsj-0003rI-Lo for qemu-devel@nongnu.org; Thu, 13 Oct 2011 16:27:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RERsi-00068W-B1 for qemu-devel@nongnu.org; Thu, 13 Oct 2011 16:27:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RERsi-00068O-06 for qemu-devel@nongnu.org; Thu, 13 Oct 2011 16:27:56 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9DKRtZS032480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Oct 2011 16:27:55 -0400 Date: Thu, 13 Oct 2011 17:27:53 -0300 From: Luiz Capitulino Message-ID: <20111013172753.3b744c58@doriath> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , qemu-devel 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. 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