From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZZ3E-0007cU-DZ for qemu-devel@nongnu.org; Fri, 25 Oct 2013 00:31:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZZ35-0008Cr-GF for qemu-devel@nongnu.org; Fri, 25 Oct 2013 00:31:08 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:42520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZZ34-0008Ca-Ri for qemu-devel@nongnu.org; Fri, 25 Oct 2013 00:30:59 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 Oct 2013 10:00:54 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 5EE8F1258051 for ; Fri, 25 Oct 2013 10:01:27 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9P4XjAn32637072 for ; Fri, 25 Oct 2013 10:03:46 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9P4Upcb027553 for ; Fri, 25 Oct 2013 10:00:51 +0530 Message-ID: <5269F3F8.4080501@linux.vnet.ibm.com> Date: Fri, 25 Oct 2013 12:30:48 +0800 From: Lei Li MIME-Version: 1.0 References: <1382412341-1173-1-git-send-email-lilei@linux.vnet.ibm.com> <1382412341-1173-15-git-send-email-lilei@linux.vnet.ibm.com> <52692AFD.7060505@redhat.com> In-Reply-To: <52692AFD.7060505@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aarcange@redhat.com, quintela@redhat.com, mdroth@linux.vnet.ibm.com, mrhines@linux.vnet.ibm.com, qemu-devel@nongnu.org, Anthony Liguori , lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com On 10/24/2013 10:13 PM, Paolo Bonzini wrote: > Il 22/10/2013 04:25, Lei Li ha scritto: >> Introduce new RanState RAN_STATE_FLIPPING_MIGRATE and >> add it to runstate_needs_reset(). > I am not sure about the name; for one thing, the new state would apply > also to postcopy migration. About the name, how about 'live-upgrade'? OK, I'll add the transition between postcopy and this new state. And should it also apply from 'prelaunch' to 'flipping-migrate' too? > > But the code looks ok. > > Paolo > >> Signed-off-by: Lei Li >> --- >> qapi-schema.json | 11 +++++++---- >> vl.c | 12 +++++++++++- >> 2 files changed, 18 insertions(+), 5 deletions(-) >> >> diff --git a/qapi-schema.json b/qapi-schema.json >> index 523a5b2..8178d0c 100644 >> --- a/qapi-schema.json >> +++ b/qapi-schema.json >> @@ -176,12 +176,15 @@ >> # @watchdog: the watchdog action is configured to pause and has been triggered >> # >> # @guest-panicked: guest has been panicked as a result of guest OS panic >> +# >> +# @flipping-migrate: guest is paused to start unix_page_flipping migration >> +# process >> ## >> { 'enum': 'RunState', >> - 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', >> - 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', >> - 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog', >> - 'guest-panicked' ] } >> + 'data': [ 'debug', 'flipping-migrate', 'inmigrate', 'internal-error', >> + 'io-error', 'paused', 'postmigrate', 'prelaunch', 'finish-migrate', >> + 'restore-vm', 'running', 'save-vm', 'shutdown', 'suspended', >> + 'watchdog', 'guest-panicked' ] } >> >> ## >> # @SnapshotInfo >> diff --git a/vl.c b/vl.c >> index b42ac67..fcdf981 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -601,6 +601,7 @@ static const RunStateTransition runstate_transitions_def[] = { >> >> { RUN_STATE_PAUSED, RUN_STATE_RUNNING }, >> { RUN_STATE_PAUSED, RUN_STATE_FINISH_MIGRATE }, >> + { RUN_STATE_PAUSED, RUN_STATE_FLIPPING_MIGRATE }, >> >> { RUN_STATE_POSTMIGRATE, RUN_STATE_RUNNING }, >> { RUN_STATE_POSTMIGRATE, RUN_STATE_FINISH_MIGRATE }, >> @@ -624,23 +625,31 @@ static const RunStateTransition runstate_transitions_def[] = { >> { RUN_STATE_RUNNING, RUN_STATE_SHUTDOWN }, >> { RUN_STATE_RUNNING, RUN_STATE_WATCHDOG }, >> { RUN_STATE_RUNNING, RUN_STATE_GUEST_PANICKED }, >> + { RUN_STATE_RUNNING, RUN_STATE_FLIPPING_MIGRATE }, >> >> { RUN_STATE_SAVE_VM, RUN_STATE_RUNNING }, >> >> { RUN_STATE_SHUTDOWN, RUN_STATE_PAUSED }, >> { RUN_STATE_SHUTDOWN, RUN_STATE_FINISH_MIGRATE }, >> + { RUN_STATE_SHUTDOWN, RUN_STATE_FLIPPING_MIGRATE }, >> >> { RUN_STATE_DEBUG, RUN_STATE_SUSPENDED }, >> { RUN_STATE_RUNNING, RUN_STATE_SUSPENDED }, >> { RUN_STATE_SUSPENDED, RUN_STATE_RUNNING }, >> { RUN_STATE_SUSPENDED, RUN_STATE_FINISH_MIGRATE }, >> + { RUN_STATE_SUSPENDED, RUN_STATE_FLIPPING_MIGRATE }, >> >> { RUN_STATE_WATCHDOG, RUN_STATE_RUNNING }, >> { RUN_STATE_WATCHDOG, RUN_STATE_FINISH_MIGRATE }, >> + { RUN_STATE_WATCHDOG, RUN_STATE_FLIPPING_MIGRATE }, >> >> { RUN_STATE_GUEST_PANICKED, RUN_STATE_PAUSED }, >> { RUN_STATE_GUEST_PANICKED, RUN_STATE_FINISH_MIGRATE }, >> { RUN_STATE_GUEST_PANICKED, RUN_STATE_DEBUG }, >> + { RUN_STATE_GUEST_PANICKED, RUN_STATE_FLIPPING_MIGRATE }, >> + >> + { RUN_STATE_FLIPPING_MIGRATE, RUN_STATE_RUNNING }, >> + { RUN_STATE_FLIPPING_MIGRATE, RUN_STATE_POSTMIGRATE }, >> >> { RUN_STATE_MAX, RUN_STATE_MAX }, >> }; >> @@ -687,7 +696,8 @@ bool runstate_needs_reset(void) >> { >> return runstate_check(RUN_STATE_INTERNAL_ERROR) || >> runstate_check(RUN_STATE_SHUTDOWN) || >> - runstate_check(RUN_STATE_GUEST_PANICKED); >> + runstate_check(RUN_STATE_GUEST_PANICKED) || >> + runstate_check(RUN_STATE_FLIPPING_MIGRATE); >> } >> >> StatusInfo *qmp_query_status(Error **errp) >> > -- Lei