[PATCH 05/10] qemu-kvm: Use thread_kicked instead of KVMCPUState::signalled

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

 



Another step forward to use signaling services from cpus.c.

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---
 cpu-defs.h |    1 -
 qemu-kvm.c |    6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/cpu-defs.h b/cpu-defs.h
index 624fd1a..5a0f11d 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -158,7 +158,6 @@ typedef struct CPUWatchpoint {
 struct qemu_work_item;
 
 struct KVMCPUState {
-    int signalled;
     struct qemu_work_item *queued_work_first, *queued_work_last;
 };
 
diff --git a/qemu-kvm.c b/qemu-kvm.c
index e5b8e42..843c973 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -840,12 +840,12 @@ void kvm_update_interrupt_request(CPUState *env)
          * Testing for created here is really redundant
          */
         if (current_env && current_env->created &&
-            env != current_env && !env->kvm_cpu_state.signalled) {
+            env != current_env && !env->thread_kicked) {
             signal = 1;
         }
 
         if (signal) {
-            env->kvm_cpu_state.signalled = 1;
+            env->thread_kicked = true;
             if (env->thread) {
                 pthread_kill(env->thread->thread, SIG_IPI);
             }
@@ -941,7 +941,7 @@ static void kvm_main_loop_wait(CPUState *env, int timeout)
         pthread_cond_signal(&qemu_pause_cond);
     }
 
-    env->kvm_cpu_state.signalled = 0;
+    env->thread_kicked = false;
 }
 
 static int all_threads_paused(void)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux