qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/2] migration: go to paused state after finishing incoming migration with -S
Date: Fri, 19 Oct 2012 16:45:24 +0200	[thread overview]
Message-ID: <1350657924-10624-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1350657924-10624-1-git-send-email-pbonzini@redhat.com>

At the end of migration the machine has started already, and cannot be
destroyed without losing the guest's data.  Hence, prelaunch is the
wrong state.  Go to the paused state instead.  QEMU would reach that
state anyway (after running the guest for the blink of an eye) if the
"stop" command had been received after the start of migration.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 migration.c | 2 +-
 vl.c        | 2 +-
 2 file modificati, 2 inserzioni(+), 2 rimozioni(-)

diff --git a/migration.c b/migration.c
index 32d43e7..72abd3c 100644
--- a/migration.c
+++ b/migration.c
@@ -108,7 +108,7 @@ static void process_incoming_migration_co(void *opaque)
     if (autostart) {
         vm_start();
     } else {
-        runstate_set(RUN_STATE_PRELAUNCH);
+        runstate_set(RUN_STATE_PAUSED);
     }
 }
 
diff --git a/vl.c b/vl.c
index 5b357a3..8b1e0b2 100644
--- a/vl.c
+++ b/vl.c
@@ -341,7 +341,7 @@ static const RunStateTransition runstate_transitions_def[] = {
     { RUN_STATE_DEBUG, RUN_STATE_RUNNING },
 
     { RUN_STATE_INMIGRATE, RUN_STATE_RUNNING },
-    { RUN_STATE_INMIGRATE, RUN_STATE_PRELAUNCH },
+    { RUN_STATE_INMIGRATE, RUN_STATE_PAUSED },
 
     { RUN_STATE_INTERNAL_ERROR, RUN_STATE_PAUSED },
     { RUN_STATE_INTERNAL_ERROR, RUN_STATE_FINISH_MIGRATE },
-- 
1.7.12.1

      parent reply	other threads:[~2012-10-19 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 14:45 [Qemu-devel] [PATCH v2 0/2] Fix stop/cont vs. connect races Paolo Bonzini
2012-10-19 14:45 ` [Qemu-devel] [PATCH v2 1/2] qmp: handle stop/cont in INMIGRATE state Paolo Bonzini
2012-10-22 15:06   ` Luiz Capitulino
2012-10-22 15:35     ` Paolo Bonzini
2012-10-22 15:38       ` Luiz Capitulino
2012-10-23 12:54         ` [Qemu-devel] [PATCH v3 " Paolo Bonzini
2012-10-23 13:39           ` Luiz Capitulino
2012-10-19 14:45 ` Paolo Bonzini [this message]

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=1350657924-10624-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).