All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zhijian <lizhijian@cn.fujitsu.com>
To: Paolo Bonzini <pbonzini@redhat.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: Thu, 14 Apr 2016 11:28:46 +0800	[thread overview]
Message-ID: <570F0E6E.3000301@cn.fujitsu.com> (raw)
In-Reply-To: <570E341A.4060201@redhat.com>

I send V2 with minor fix
- fix patch title typo 'chanage' -> 'change'
- coding sytle: 'return ;' -> 'return;'
- add Acked tag

pls review the V2.

Best regards
Li Zhijian


On 04/13/2016 07:57 PM, Paolo Bonzini wrote:
> 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],
>>
>
>
>

      reply	other threads:[~2016-04-14  3:28 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
2016-04-14  3:28   ` Li Zhijian [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=570F0E6E.3000301@cn.fujitsu.com \
    --to=lizhijian@cn.fujitsu.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.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 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.