From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] honor -S on incoming migration
Date: Tue, 14 Jul 2009 09:59:13 -0500 [thread overview]
Message-ID: <4A5C9D41.9040907@codemonkey.ws> (raw)
In-Reply-To: <1247579000-8535-1-git-send-email-pbonzini@redhat.com>
Paolo Bonzini wrote:
> -S is not honored by qemu on incoming migration. If a domain is migrated
> while paused, thus, it will start running on the remote machine; this
> is wrong.
>
> Given the trivial patch to fix this, it looks more like a thinko
> than anything else, probably dating back to the qemu-kvm merge.
> The interesting part is that the -S mechanism was in fact *used* when
> migrating (setting autostart = 0) and the incoming migration code was
> starting the VM at the end of the migration.
>
> Since I was removing the vm_start from there, I also corrected a related
> imprecision. The code was doing a vm_stop "just in case", but we can
> be sure that the VM is not running---the vm_start call in vl.c has not
> been reached yet, and we rely on this now that the vm_start is removed
> in migrate-*.c. So it's better to assert (!vm_running) instead.
>
Needs a Signed-off-by.
> ---
> migration-exec.c | 3 +--
> migration-tcp.c | 4 +---
> vl.c | 4 +---
> 3 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/migration-exec.c b/migration-exec.c
> index 0dd5aff..5a111a0 100644
> --- a/migration-exec.c
> +++ b/migration-exec.c
> @@ -109,7 +109,7 @@ static void exec_accept_incoming_migration(void *opaque)
> QEMUFile *f = opaque;
> int ret;
>
> - vm_stop(0); /* just in case */
> + assert(!vm_running); /* just in case */
>
I'd suggest removing the asserts but other than that, the patch looks good.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-07-14 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 13:43 [Qemu-devel] [PATCH] honor -S on incoming migration Paolo Bonzini
2009-07-14 14:59 ` Anthony Liguori [this message]
2009-07-14 16:07 ` [Qemu-devel] [PATCH v2] " Paolo Bonzini
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=4A5C9D41.9040907@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=pbonzini@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).