From: Paolo Bonzini <pbonzini@redhat.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] vl: chanage runstate only if new state is different from current state
Date: Wed, 13 Apr 2016 13:57:14 +0200 [thread overview]
Message-ID: <570E341A.4060201@redhat.com> (raw)
In-Reply-To: <1460539671-11326-1-git-send-email-lizhijian@cn.fujitsu.com>
On 13/04/2016 11:27, 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>
Can someone I've CCed help this patch, since I won't be able to send a
pull request?
Paolo
> 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],
>
next prev parent reply other threads:[~2016-04-13 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 9:27 [Qemu-devel] [PATCH] vl: chanage runstate only if new state is different from current state Li Zhijian
2016-04-13 11:57 ` Paolo Bonzini [this message]
2016-04-14 3:28 ` Li Zhijian
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=570E341A.4060201@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=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 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).