From patchwork Tue Oct 27 16:41:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Lalancette X-Patchwork-Id: 56134 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9RGfJLB031042 for ; Tue, 27 Oct 2009 16:41:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756148AbZJ0QlJ (ORCPT ); Tue, 27 Oct 2009 12:41:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756103AbZJ0QlI (ORCPT ); Tue, 27 Oct 2009 12:41:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4293 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756111AbZJ0QlG (ORCPT ); Tue, 27 Oct 2009 12:41:06 -0400 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 n9RGfBXC007619 for ; Tue, 27 Oct 2009 12:41:12 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9RGf8PJ005287; Tue, 27 Oct 2009 12:41:11 -0400 From: Chris Lalancette To: kvm@vger.kernel.org Cc: Chris Lalancette Subject: [PATCH 2/5] Remove KVM_REQ_PENDING_TIMER. Date: Tue, 27 Oct 2009 17:41:04 +0100 Message-Id: <1256661667-9298-3-git-send-email-clalance@redhat.com> In-Reply-To: <1256661667-9298-1-git-send-email-clalance@redhat.com> References: <1256661667-9298-1-git-send-email-clalance@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 2ef3906..93a65b4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3906,7 +3906,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