From: Chris Lalancette Subject: [PATCH 03/12] Remove KVM_REQ_PENDING_TIMER. Date: Tue, 1 Dec 2009 15:36:32 +0100 Message-ID: <1259678201-11203-4-git-send-email-clalance@redhat.com> References: <1259678201-11203-1-git-send-email-clalance@redhat.com> Cc: Chris Lalancette To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27003 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbZLAOhA (ORCPT ); Tue, 1 Dec 2009 09:37:00 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB1Eb78o016202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 1 Dec 2009 09:37:07 -0500 In-Reply-To: <1259678201-11203-1-git-send-email-clalance@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: KVM_REQ_PENDING_TIMER is set and cleared in a couple of places, but it never seems to be actually checked. Remove it. Signed-off-by: Chris Lalancette --- arch/x86/kvm/timer.c | 5 +---- arch/x86/kvm/x86.c | 1 - include/linux/kvm_host.h | 1 - 3 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/timer.c b/arch/x86/kvm/timer.c index eea4043..72b5144 100644 --- a/arch/x86/kvm/timer.c +++ b/arch/x86/kvm/timer.c @@ -14,11 +14,8 @@ static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer) * not care about potentially loosing timer events in the !reinject * case anyway. */ - if (ktimer->reinject || !atomic_read(&ktimer->pending)) { + 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)) wake_up_interruptible(q); diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 153a526..2fb4251 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4034,7 +4034,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 bd5a616..053e49f 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -33,7 +33,6 @@ #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 -- 1.6.5.2