]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: prevent guest softlockup errors when pausing
authorSasha Levin <levinsasha928@gmail.com>
Thu, 2 Aug 2012 14:29:23 +0000 (16:29 +0200)
committerPekka Enberg <penberg@kernel.org>
Sat, 4 Aug 2012 09:05:40 +0000 (12:05 +0300)
Use the new KVM_KVMCLOCK_CTRL ioctl to prevent guests from wrongfully
detecting lockups when in fact they were paused.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/builtin-run.c

index 952534141f553b8c1dd76c857f22306f3c6aaa0f..a36bd004c4239b87d9f94bd2767108f6d1604daa 100644 (file)
@@ -531,6 +531,7 @@ static void handle_pause(int fd, u32 type, u32 len, u8 *msg)
                kvm__continue();
        } else if (type == KVM_IPC_PAUSE && !is_paused) {
                kvm->vm_state = KVM_VMSTATE_PAUSED;
+               ioctl(kvm->vm_fd, KVM_KVMCLOCK_CTRL);
                kvm__pause();
        } else {
                return;