From: Anthony PERARD <anthony.perard@citrix.com>
To: QEMU-devel <qemu-devel@nongnu.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Xen Devel <xen-devel@lists.xensource.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Qemu-devel] [PATCH 3/5] Introduce premigrate RunState.
Date: Thu, 24 Nov 2011 16:08:11 +0000 [thread overview]
Message-ID: <1322150893-887-4-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1322150893-887-1-git-send-email-anthony.perard@citrix.com>
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 <anthony.perard@citrix.com>
---
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;
--
Anthony PERARD
next prev parent reply other threads:[~2011-11-24 16:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 16:08 [Qemu-devel] [PATCH 0/5] Have a working migration with Xen Anthony PERARD
2011-11-24 16:08 ` [Qemu-devel] [PATCH 1/5] vl.c: Do not save RAM state when Xen is used Anthony PERARD
2011-11-24 17:23 ` Stefano Stabellini
2011-11-24 18:06 ` Anthony PERARD
2011-11-24 16:08 ` [Qemu-devel] [PATCH 2/5] xen mapcache: Check if a memory space has moved Anthony PERARD
2011-11-24 17:40 ` Stefano Stabellini
2011-11-24 17:57 ` Stefano Stabellini
2011-11-24 16:08 ` Anthony PERARD [this message]
2011-11-24 16:08 ` [Qemu-devel] [PATCH 4/5] xen: Change memory access behavior during migration Anthony PERARD
2011-11-24 16:08 ` [Qemu-devel] [PATCH 5/5] vga-cirrus: Workaround during restore when using Xen Anthony PERARD
2011-11-24 18:30 ` Stefano Stabellini
2011-11-24 18:49 ` Anthony PERARD
2011-11-25 11:51 ` Stefano Stabellini
2011-11-25 12:33 ` Anthony PERARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322150893-887-4-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).