Avoid kicking running CPUs, trying to resume them.

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
 system/cpus.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/system/cpus.c b/system/cpus.c
index aa7bfcf56e5..6062226d4ac 100644
--- a/system/cpus.c
+++ b/system/cpus.c
@@ -666,7 +666,9 @@ void resume_all_vcpus(void)
 
     qemu_clock_enable(QEMU_CLOCK_VIRTUAL, true);
     CPU_FOREACH(cpu) {
-        cpu_resume(cpu);
+        if (cpu->halted) {
+            cpu_resume(cpu);
+        }
     }
 }
 
-- 
2.51.0


Reply via email to