kvm tools: prevent guest softlockup errors when pausing

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>
This commit is contained in:
Sasha Levin
2012-08-02 16:29:23 +02:00
committed by Will Deacon
parent 5236b50516
commit eb8dad9d6e
+1
View 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;