public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: penberg@kernel.org, mingo@elte.hu, gorcunov@gmail.com
Cc: kvm@vger.kernel.org, Sasha Levin <levinsasha928@gmail.com>
Subject: [PATCH 1/2] kvm tools: prevent guest softlockup errors when pausing
Date: Thu,  2 Aug 2012 16:29:23 +0200	[thread overview]
Message-ID: <1343917764-28715-1-git-send-email-levinsasha928@gmail.com> (raw)

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


             reply	other threads:[~2012-08-02 14:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 14:29 Sasha Levin [this message]
2012-08-02 14:29 ` [PATCH 2/2] kvm tools: inject MSI directly without going through a GSI Sasha Levin
2012-08-04  9:14   ` Pekka Enberg
2012-08-04  9:30     ` Sasha Levin
2012-08-04 11:02       ` Pekka Enberg
2012-08-05  7:02         ` Sasha Levin
2012-08-05  9:08           ` Pekka Enberg
2012-08-05  9:14             ` Sasha Levin
2012-08-05  9:31               ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343917764-28715-1-git-send-email-levinsasha928@gmail.com \
    --to=levinsasha928@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox