public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: Drop KVM_REQ_PENDING_TIMER
@ 2010-03-20  3:20 Xiao Wang
  2010-03-21 12:34 ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Xiao Wang @ 2010-03-20  3:20 UTC (permalink / raw)
  To: avi, mtosatti; +Cc: kvm, akong, Xiao Wang

The pending timer is not detected through KVM_REQ_PENDING_TIMER now.

Signed-off-by: Xiao Wang <sirouni@gmail.com>
---
 arch/x86/kvm/timer.c     |    2 --
 arch/x86/kvm/x86.c       |    1 -
 include/linux/kvm_host.h |   11 +++++------
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/x86/kvm/timer.c b/arch/x86/kvm/timer.c
index eea4043..3aa09a6 100644
--- a/arch/x86/kvm/timer.c
+++ b/arch/x86/kvm/timer.c
@@ -16,8 +16,6 @@ static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer)
 	 */
 	if (ktimer->reinject || !atomic_read(&ktimer->pending)) {
 		atomic_inc(&ktimer->pending);
-		/* FIXME: this code should not know anything about vcpus */
-		set_bit(KVM_REQ_PENDING_TIMER, &vcpu->requests);
 	}
 
 	if (waitqueue_active(q))
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bcf52d1..a4baab4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4444,7 +4444,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)
 		if (r <= 0)
 			break;
 
-		clear_bit(KVM_REQ_PENDING_TIMER, &vcpu->requests);
 		if (kvm_cpu_has_pending_timer(vcpu))
 			kvm_inject_pending_timer_irqs(vcpu);
 
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index a3fd0f9..592c04b 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -33,12 +33,11 @@
 #define KVM_REQ_REPORT_TPR_ACCESS  2
 #define KVM_REQ_MMU_RELOAD         3
 #define KVM_REQ_TRIPLE_FAULT       4
-#define KVM_REQ_PENDING_TIMER      5
-#define KVM_REQ_UNHALT             6
-#define KVM_REQ_MMU_SYNC           7
-#define KVM_REQ_KVMCLOCK_UPDATE    8
-#define KVM_REQ_KICK               9
-#define KVM_REQ_DEACTIVATE_FPU    10
+#define KVM_REQ_UNHALT             5
+#define KVM_REQ_MMU_SYNC           6
+#define KVM_REQ_KVMCLOCK_UPDATE    7
+#define KVM_REQ_KICK               8
+#define KVM_REQ_DEACTIVATE_FPU     9
 
 #define KVM_USERSPACE_IRQ_SOURCE_ID	0
 
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-24 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20  3:20 [PATCH] KVM: Drop KVM_REQ_PENDING_TIMER Xiao Wang
2010-03-21 12:34 ` Avi Kivity
2010-03-23 17:15   ` KVM: x86: document KVM_REQ_PENDING_TIMER usage Marcelo Tosatti
2010-03-24  9:23     ` Avi Kivity
     [not found]     ` <cf3d7eae1003231810v57a03421y4bba07c02d690a31@mail.gmail.com>
2010-03-24 15:43       ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox