All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>,
	qemu-devel@nongnu.org, kraxel@redhat.com, quintela@redhat.com,
	peter.maydell@linaro.org, qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state
Date: Tue, 10 May 2016 11:25:50 +0200	[thread overview]
Message-ID: <5731A91E.9040304@redhat.com> (raw)
In-Reply-To: <1460604352-18630-1-git-send-email-lizhijian@cn.fujitsu.com>

On 14/04/2016 05:25, Li Zhijian wrote:
> Previously, qemu will abort at following scenario:
> (qemu) stop
> (qemu) system_reset
> (qemu) system_reset
> (qemu) 2016-04-13T20:54:38.979158Z qemu-system-x86_64: invalid runstate transition: 'prelaunch' -> 'prelaunch'
> 
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> from v1
> - fix patch title typo 'chanage' -> 'change'
> - coding sytle: 'return ;' -> 'return;'
> - add Acked tag
>  vl.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/vl.c b/vl.c
> index 9df534f..039a353 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -692,6 +692,10 @@ void runstate_set(RunState new_state)
>  {
>      assert(new_state < RUN_STATE__MAX);
>  
> +    if (current_run_state == new_state) {
> +        return;
> +    }
> +
>      if (!runstate_valid_transitions[current_run_state][new_state]) {
>          error_report("invalid runstate transition: '%s' -> '%s'",
>                       RunState_lookup[current_run_state],
> 

Queued for 2.7, and added Cc: qemu-stable@nongnu.org.

Thanks,

Paolo

      parent reply	other threads:[~2016-05-10  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14  3:25 [Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state Li Zhijian
2016-04-27  1:48 ` Li Zhijian
2016-05-10  9:25 ` 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=5731A91E.9040304@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=quintela@redhat.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 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.