Patchwork [v2,3/3] Do not kick vcpus in TCG mode

login
register
mail settings
Submitter Jan Kiszka
Date April 11, 2011, 8:27 p.m.
Message ID <6716fa38e63b1b17a042ce007fd07677dd80c43e.1302553661.git.jan.kiszka@web.de>
Download mbox | patch
Permalink /patch/90693/
State New
Headers show

Comments

Jan Kiszka - April 11, 2011, 8:27 p.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

In TCG mode, iothread and vcpus run in lock-step. So it's pointless to
send a signal from qemu_cpu_kick to the vcpu thread - if we got here,
the receiver already left the vcpu loop.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 cpus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/cpus.c b/cpus.c
index 41bec7c..82a7806 100644
--- a/cpus.c
+++ b/cpus.c
@@ -860,7 +860,7 @@  void qemu_cpu_kick(void *_env)
     CPUState *env = _env;
 
     qemu_cond_broadcast(env->halt_cond);
-    if (!env->thread_kicked) {
+    if (kvm_enabled() && !env->thread_kicked) {
         qemu_cpu_kick_thread(env);
         env->thread_kicked = true;
     }