qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 2/3] runstate: introduce suspended state
Date: Fri, 04 May 2012 15:54:26 +0200	[thread overview]
Message-ID: <4FA3DF92.9080208@redhat.com> (raw)
In-Reply-To: <20120504103338.6eb7606e@doriath.home>

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

  Hi,

> There's a quite simple and stupid way to do it. When we migrate an stopped
> VM, it's automatically resumed on the target. We could do the same for a
> suspended VM: we could automatically resume it before migrating, as you said
> above.
> 
> That's not the behavior I'd expect, I mean I would expect a stopped VM to
> remain stopped after it's migrated. But it has always been this way and I'm
> afraid we can't change this.

Oh, I wasn't aware that a stopped vm behaves the same way.  So resuming
on migration is sort-of bug compatible then.  Patch attached.  Will you
add it to your series or should I submit it separately?

cheers,
  Gerd

[-- Attachment #2: 0001-wakeup-on-migration.patch --]
[-- Type: text/plain, Size: 930 bytes --]

>From 566ec2adacfa570e9d08067e242a6b7224c46c8e Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Wed, 7 Mar 2012 08:00:26 +0100
Subject: [PATCH] wakeup on migration

Wakeup the guest when the live part of the migation is finished.
This avoids being in suspended state on migration, so we don't
have to save the is_suspended bit.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 migration.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/migration.c b/migration.c
index 94f7839..f9e968e 100644
--- a/migration.c
+++ b/migration.c
@@ -252,6 +252,7 @@ static void migrate_fd_put_ready(void *opaque)
         int old_vm_running = runstate_is_running();
 
         DPRINTF("done iterating\n");
+        qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
         vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
 
         if (qemu_savevm_state_complete(s->file) < 0) {
-- 
1.7.1


  reply	other threads:[~2012-05-04 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1335559216-13849-1-git-send-email-lcapitulino@redhat.com>
     [not found] ` <1335559216-13849-3-git-send-email-lcapitulino@redhat.com>
2012-05-02  7:08   ` [Qemu-devel] [PATCH 2/3] runstate: introduce suspended state Gerd Hoffmann
2012-05-02 18:34     ` Luiz Capitulino
2012-05-03  7:56       ` Gerd Hoffmann
2012-05-03 20:30         ` Luiz Capitulino
2012-05-04  8:50           ` Gerd Hoffmann
2012-05-04 13:33             ` Luiz Capitulino
2012-05-04 13:54               ` Gerd Hoffmann [this message]
2012-05-04 14:00                 ` Luiz Capitulino

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=4FA3DF92.9080208@redhat.com \
    --to=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.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).