All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dor Laor <dor.laor@qumranet.com>
To: kvm-devel <kvm@vger.kernel.org>, Avi Kivity <avi@qumranet.com>
Cc: Yaniv Kamay <yaniv.kamay@qumranet.com>
Subject: [PATCH] Fix block mode during halt emulation
Date: Tue, 01 Jul 2008 01:30:08 +0300	[thread overview]
Message-ID: <1214865008.11535.41.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

>From d85feaae019bc0abc98a2524369e04d521a78aa8 Mon Sep 17 00:00:00 2001
From: Dor Laor <dor.laor@qumranet.com>
Date: Mon, 30 Jun 2008 18:22:44 -0400
Subject: [PATCH] Fix block mode hduring halt emulation

There is no need to check for pending pit/apic timer, nor
pending virq, since all of the check KVM_MP_STATE_RUNNABLE
and wakeup the waitqueue.

It fixes 100% cpu when windows guest is shutdown (non acpi HAL)

Signed-off-by: Dor Laor <dor.laor@qumranet.com>
---
 virt/kvm/kvm_main.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index b90da0b..faa0778 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -816,10 +816,6 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
 	for (;;) {
 		prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE);
 
-		if (kvm_cpu_has_interrupt(vcpu))
-			break;
-		if (kvm_cpu_has_pending_timer(vcpu))
-			break;
 		if (kvm_arch_vcpu_runnable(vcpu))
 			break;
 		if (signal_pending(current))
-- 
1.5.4

[-- Attachment #2: 0001-Fix-block-mode-during-halt-emulation.patch --]
[-- Type: application/mbox, Size: 1012 bytes --]

             reply	other threads:[~2008-06-30 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-30 22:30 Dor Laor [this message]
2008-07-01  7:29 ` [PATCH] Fix block mode during halt emulation Dor Laor
2008-07-01 15:05 ` Marcelo Tosatti

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=1214865008.11535.41.camel@localhost.localdomain \
    --to=dor.laor@qumranet.com \
    --cc=avi@qumranet.com \
    --cc=kvm@vger.kernel.org \
    --cc=yaniv.kamay@qumranet.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.