From patchwork Wed Oct 19 12:56:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 120622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5FBD3B71BF for ; Wed, 19 Oct 2011 23:57:35 +1100 (EST) Received: from localhost ([::1]:57315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGVi1-0007Xy-0q for incoming@patchwork.ozlabs.org; Wed, 19 Oct 2011 08:57:25 -0400 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 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 p9JCv35X006190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Oct 2011 08:57:03 -0400 Received: from localhost (ovpn-113-110.phx2.redhat.com [10.3.113.110]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9JCv1sL031250; Wed, 19 Oct 2011 08:57:02 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 4/5] savevm: qemu_savevm_state(): Drop stop VM logic X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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; }