From: Luiz Capitulino <lcapitulino@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] runstate: add more valid transitions
Date: Mon, 10 Oct 2011 15:50:13 -0300 [thread overview]
Message-ID: <20111010155013.0c1e40c4@doriath> (raw)
In-Reply-To: <1317734140-18478-1-git-send-email-pbonzini@redhat.com>
On Tue, 4 Oct 2011 15:15:40 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> This patch adds more valid transitions to the table, and avoids
> that the VM remains stuck in RSTATE_SAVEVM state when savevm is
> done on a paused virtual machine.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Looks good, but it needs to be rebased against latest master.
> ---
> savevm.c | 9 +++++++--
> vl.c | 5 +++++
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/savevm.c b/savevm.c
> index 46f2447..ff37968 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -1626,8 +1626,13 @@ out:
> if (qemu_file_has_error(f))
> ret = -EIO;
>
> - if (!ret && saved_vm_running)
> - vm_start();
> + if (!ret) {
> + if (saved_vm_running) {
> + vm_start();
> + } else {
> + runstate_set(RSTATE_PAUSED);
> + }
> + }
>
> return ret;
> }
> diff --git a/vl.c b/vl.c
> index bd4a5ce..165712e 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -346,8 +346,12 @@ static const RunStateTransition runstate_transitions_def[] = {
> { RSTATE_IO_ERROR, RSTATE_RUNNING },
>
> { RSTATE_PAUSED, RSTATE_RUNNING },
> + { RSTATE_PAUSED, RSTATE_PRE_MIGRATE },
> + { RSTATE_PAUSED, RSTATE_SAVEVM },
>
> { RSTATE_POST_MIGRATE, RSTATE_RUNNING },
> + { RSTATE_POST_MIGRATE, RSTATE_PRE_MIGRATE },
> + { RSTATE_POST_MIGRATE, RSTATE_SAVEVM },
>
> { RSTATE_PRE_LAUNCH, RSTATE_RUNNING },
> { RSTATE_PRE_LAUNCH, RSTATE_POST_MIGRATE },
> @@ -368,6 +372,7 @@ static const RunStateTransition runstate_transitions_def[] = {
> { RSTATE_RUNNING, RSTATE_WATCHDOG },
>
> { RSTATE_SAVEVM, RSTATE_RUNNING },
> + { RSTATE_SAVEVM, RSTATE_PAUSED },
>
> { RSTATE_SHUTDOWN, RSTATE_PAUSED },
>
next prev parent reply other threads:[~2011-10-10 18:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 13:10 [Qemu-devel] [PATCH] runstate: add more valid transitions Paolo Bonzini
2011-10-04 13:15 ` [Qemu-devel] [PATCH v2] " Paolo Bonzini
2011-10-10 18:50 ` Luiz Capitulino [this message]
2011-10-11 7:22 ` Paolo Bonzini
2011-10-11 17:52 ` Luiz Capitulino
2011-10-13 20:26 ` Luiz Capitulino
2011-10-14 6:56 ` Paolo Bonzini
2011-10-14 13:23 ` Luiz Capitulino
2011-10-14 13:37 ` Paolo Bonzini
2011-10-14 14:24 ` Luiz Capitulino
2011-10-14 14:26 ` 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=20111010155013.0c1e40c4@doriath \
--to=lcapitulino@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.