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 <levinsasha...@gmail.com>
---
 tools/kvm/builtin-run.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index 21d5f34..a4d900b 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -524,6 +524,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;
-- 
1.7.8.6

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

Reply via email to