From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbD0d-0001X5-QI for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:14:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbD0X-0002dC-UA for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:14:11 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:41335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbD0X-0002bI-Qd for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:14:05 -0500 Received: by ghbg19 with SMTP id g19so1877782ghb.4 for ; Thu, 15 Dec 2011 07:14:05 -0800 (PST) Message-ID: <4EEA0EB8.4020203@codemonkey.ws> Date: Thu, 15 Dec 2011 09:14:00 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1323467645-24271-1-git-send-email-anthony.perard@citrix.com> <1323467645-24271-4-git-send-email-anthony.perard@citrix.com> In-Reply-To: <1323467645-24271-4-git-send-email-anthony.perard@citrix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V2 3/5] Introduce premigrate RunState. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Luiz Capitulino , Xen Devel , QEMU-devel , Stefano Stabellini On 12/09/2011 03:54 PM, Anthony PERARD wrote: > This new state will be used by Xen functions to know QEMU will wait for a > migration. This is important to know for memory related function because the > memory is already allocated and reallocated them will not works. > > Signed-off-by: Anthony PERARD Luiz, please Ack. In the future, when you make QMP changes, please CC the appropriate maintainer. Regards, Anthony Liguori > --- > qapi-schema.json | 2 +- > vl.c | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/qapi-schema.json b/qapi-schema.json > index cb1ba77..bd77444 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -121,7 +121,7 @@ > { 'enum': 'RunState', > 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', > 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', > - 'running', 'save-vm', 'shutdown', 'watchdog' ] } > + 'running', 'save-vm', 'shutdown', 'watchdog', 'premigrate' ] } > > ## > # @StatusInfo: > diff --git a/vl.c b/vl.c > index e7dced2..a291416 100644 > --- a/vl.c > +++ b/vl.c > @@ -351,8 +351,11 @@ static const RunStateTransition runstate_transitions_def[] = { > > { RUN_STATE_PRELAUNCH, RUN_STATE_RUNNING }, > { RUN_STATE_PRELAUNCH, RUN_STATE_FINISH_MIGRATE }, > + { RUN_STATE_PRELAUNCH, RUN_STATE_PREMIGRATE }, > { RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE }, > > + { RUN_STATE_PREMIGRATE, RUN_STATE_INMIGRATE }, > + > { RUN_STATE_FINISH_MIGRATE, RUN_STATE_RUNNING }, > { RUN_STATE_FINISH_MIGRATE, RUN_STATE_POSTMIGRATE }, > > @@ -2975,6 +2978,7 @@ int main(int argc, char **argv, char **envp) > break; > case QEMU_OPTION_incoming: > incoming = optarg; > + runstate_set(RUN_STATE_PREMIGRATE); > break; > case QEMU_OPTION_nodefaults: > default_serial = 0;