From patchwork Mon Jul 9 17:05:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 1174121 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 686CA40B21 for ; Mon, 9 Jul 2012 17:06:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599Ab2GIRFx (ORCPT ); Mon, 9 Jul 2012 13:05:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46986 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932Ab2GIRFw (ORCPT ); Mon, 9 Jul 2012 13:05:52 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q69H5qKG019356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Jul 2012 13:05:52 -0400 Received: from s01.tlv.redhat.com (s01.tlv.redhat.com [10.35.255.8]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q69H5mDF016692; Mon, 9 Jul 2012 13:05:51 -0400 From: Avi Kivity To: Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH v3 1/6] KVM: Don't use KVM_REQ_PENDING_TIMER Date: Mon, 9 Jul 2012 20:05:40 +0300 Message-Id: <1341853545-3023-2-git-send-email-avi@redhat.com> In-Reply-To: <1341853545-3023-1-git-send-email-avi@redhat.com> References: <1341853545-3023-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org It's a write-only bit, set by the timer and cleared by the main loop. Remove it. Retain the definition since ppc uses it. Signed-off-by: Avi Kivity --- arch/x86/kvm/timer.c | 8 ++------ arch/x86/kvm/x86.c | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/timer.c b/arch/x86/kvm/timer.c index 6b85cc6..c28f838 100644 --- a/arch/x86/kvm/timer.c +++ b/arch/x86/kvm/timer.c @@ -27,14 +27,10 @@ enum hrtimer_restart kvm_timer_fn(struct hrtimer *data) /* * There is a race window between reading and incrementing, but we do * not care about potentially losing timer events in the !reinject - * case anyway. Note: KVM_REQ_PENDING_TIMER is implicitly checked - * in vcpu_enter_guest. + * 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 */ - kvm_make_request(KVM_REQ_PENDING_TIMER, vcpu); - } if (waitqueue_active(q)) wake_up_interruptible(q); diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ff0b487..ae07ef2 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5437,7 +5437,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);