All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state
@ 2016-04-14  3:25 Li Zhijian
  2016-04-27  1:48 ` Li Zhijian
  2016-05-10  9:25 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Li Zhijian @ 2016-04-14  3:25 UTC (permalink / raw)
  To: pbonzini, qemu-devel, kraxel, quintela, peter.maydell; +Cc: Li Zhijian

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],
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Li Zhijian @ 2016-04-27  1:48 UTC (permalink / raw)
  To: pbonzini, qemu-devel, kraxel, quintela, peter.maydell

ping...


Thanks
Li Zhijian

On 04/14/2016 11:25 AM, 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],
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-05-10  9:25 UTC (permalink / raw)
  To: Li Zhijian, qemu-devel, kraxel, quintela, peter.maydell,
	qemu-stable

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-10  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.