Patchwork [11/21] exit round-robin vcpu loop if cpu->stopped is true

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 21, 2011, 8:43 a.m.
Message ID <1298277820-8817-12-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/83794/
State New
Headers show

Comments

Paolo Bonzini - Feb. 21, 2011, 8:43 a.m.
Sometimes vcpus are stopped directly without going through ->stop = 1.
Exit the VCPU execution loop in this case as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 cpus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/cpus.c b/cpus.c
index 7a9440f..912e0d8 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1098,7 +1098,7 @@  bool cpu_exec_all(void)
                 cpu_handle_debug_exception(env);
                 break;
             }
-        } else if (env->stop) {
+        } else if (env->stop || env->stopped) {
             break;
         }
     }