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>
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;