From patchwork Tue Mar 23 17:15:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 87710 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2NHGtCu021193 for ; Tue, 23 Mar 2010 17:16:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752510Ab0CWRQx (ORCPT ); Tue, 23 Mar 2010 13:16:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14095 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752019Ab0CWRQw (ORCPT ); Tue, 23 Mar 2010 13:16:52 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2NHGq0Q027733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 23 Mar 2010 13:16:52 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2NHGpLd021778; Tue, 23 Mar 2010 13:16:51 -0400 Received: from amt.cnet (vpn-10-84.rdu.redhat.com [10.11.10.84]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o2NHGnJx002141; Tue, 23 Mar 2010 13:16:50 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 3C733652086; Tue, 23 Mar 2010 14:15:56 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o2NHFrOb020301; Tue, 23 Mar 2010 14:15:53 -0300 Date: Tue, 23 Mar 2010 14:15:53 -0300 From: Marcelo Tosatti To: Avi Kivity Cc: Xiao Wang , kvm@vger.kernel.org, akong@redhat.com Subject: KVM: x86: document KVM_REQ_PENDING_TIMER usage Message-ID: <20100323171553.GA20283@amt.cnet> References: <1269055202-3195-1-git-send-email-sirouni@gmail.com> <4BA6125E.80006@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4BA6125E.80006@redhat.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 17:16:56 +0000 (UTC) diff --git a/arch/x86/kvm/timer.c b/arch/x86/kvm/timer.c index eea4043..9805f05 100644 --- a/arch/x86/kvm/timer.c +++ b/arch/x86/kvm/timer.c @@ -12,7 +12,8 @@ static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer) /* * There is a race window between reading and incrementing, but we do * not care about potentially loosing timer events in the !reinject - * case anyway. + * case anyway. Note: KVM_REQ_PENDING_TIMER is implicitly checked + * in vcpu_enter_guest. */ if (ktimer->reinject || !atomic_read(&ktimer->pending)) { atomic_inc(&ktimer->pending);