qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] vl: change runstate only if new state is dif


From: Li Zhijian
Subject: Re: [Qemu-devel] [PATCH v2] vl: change runstate only if new state is different from current state
Date: Wed, 27 Apr 2016 09:48:40 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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 <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
---
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],






reply via email to

[Prev in Thread] Current Thread [Next in Thread]