]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Fix 'lkvm stop' when guest is pasued.
authorAsias He <asias.hejun@gmail.com>
Wed, 21 Dec 2011 13:47:10 +0000 (21:47 +0800)
committerPekka Enberg <penberg@kernel.org>
Wed, 21 Dec 2011 20:31:55 +0000 (22:31 +0200)
Currently, 'lkvm stop' can not stop a pasued guest becasue
guest is blocked on the pause_lock.

This patch fixes it by un-pausing the guest before stops it.

The pthread_kill() call is not needed.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/kvm-cpu.c

index 52db84a5e57ed6dc35991366c11e9646ea37f1de..bdefa09ac72c56b86c912c39e079d1791e0d7bb9 100644 (file)
@@ -39,7 +39,7 @@ static void kvm_cpu_signal_handler(int signum)
        if (signum == SIGKVMEXIT) {
                if (current_kvm_cpu && current_kvm_cpu->is_running) {
                        current_kvm_cpu->is_running = false;
-                       pthread_kill(pthread_self(), SIGKVMEXIT);
+                       kvm__continue();
                }
        } else if (signum == SIGKVMPAUSE) {
                current_kvm_cpu->paused = 1;