From patchwork Wed Oct 19 12:56:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 120623 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 B6EE6B71D3 for ; Wed, 19 Oct 2011 23:57:41 +1100 (EST) Received: from localhost ([::1]:57259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGVhz-0007VT-Np for incoming@patchwork.ozlabs.org; Wed, 19 Oct 2011 08:57:23 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGVhj-0007La-7q for qemu-devel@nongnu.org; Wed, 19 Oct 2011 08:57:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGVhg-0007oq-Ia for qemu-devel@nongnu.org; Wed, 19 Oct 2011 08:57:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGVhg-0007oX-7M for qemu-devel@nongnu.org; Wed, 19 Oct 2011 08:57:04 -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 p9JCv18X004652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Oct 2011 08:57:01 -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 p9JCuxFA031242; Wed, 19 Oct 2011 08:57:00 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Wed, 19 Oct 2011 10:56:49 -0200 Message-Id: <1319029011-11706-4-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 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 2a634a7..3e5fdf5 100644 --- a/vl.c +++ b/vl.c @@ -341,6 +341,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 },