From patchwork Fri Oct 14 17:26:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 119870 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 5EDF0B6FA6 for ; Sat, 15 Oct 2011 04:27:49 +1100 (EST) Received: from localhost ([::1]:49430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RElXs-0005BC-Nu for incoming@patchwork.ozlabs.org; Fri, 14 Oct 2011 13:27:44 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RElX5-0002s2-Fs for qemu-devel@nongnu.org; Fri, 14 Oct 2011 13:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RElX4-0001h5-AF for qemu-devel@nongnu.org; Fri, 14 Oct 2011 13:26:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RElX3-0001gw-Qi for qemu-devel@nongnu.org; Fri, 14 Oct 2011 13:26:54 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9EHQqtY003168 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Oct 2011 13:26:53 -0400 Received: from localhost (ovpn-113-165.phx2.redhat.com [10.3.113.165]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9EHQpDM018367; Fri, 14 Oct 2011 13:26:52 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Fri, 14 Oct 2011 14:26:41 -0300 Message-Id: <1318613203-25892-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1318613203-25892-1-git-send-email-lcapitulino@redhat.com> References: <1318613203-25892-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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 3/5] runstate: Allow to transition from paused to postmigrate 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 The user may already have paused the VM before starting the migration process. If s/he does that, then the state will be 'paused' when we finish the migration process. In that case we want to transition from 'paused' to 'postmigrate' as the latter is now the real reason why the VM is stopped. Signed-off-by: Luiz Capitulino --- vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 6645720..2e991fc 100644 --- a/vl.c +++ b/vl.c @@ -343,6 +343,7 @@ static const RunStateTransition runstate_transitions_def[] = { { RUN_STATE_IO_ERROR, RUN_STATE_RUNNING }, { RUN_STATE_PAUSED, RUN_STATE_RUNNING }, + { RUN_STATE_PAUSED, RUN_STATE_POSTMIGRATE }, { RUN_STATE_POSTMIGRATE, RUN_STATE_RUNNING },