From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: Fix race between APIC TMR and IRR Date: Wed, 30 Dec 2009 11:42:03 +0200 Message-ID: <4B3B206B.7040709@redhat.com> References: <1262083336-5491-1-git-send-email-avi@redhat.com> <20091229220939.GA17127@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60617 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751581AbZL3JmE (ORCPT ); Wed, 30 Dec 2009 04:42:04 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBU9g4Kg012302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Dec 2009 04:42:04 -0500 In-Reply-To: <20091229220939.GA17127@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 12/30/2009 12:09 AM, Marcelo Tosatti wrote: > On Tue, Dec 29, 2009 at 12:42:16PM +0200, Avi Kivity wrote: > >> When we queue an interrupt to the local apic, we set the IRR before the TMR. >> The vcpu can pick up the IRR and inject the interrupt before setting the TMR, >> and perhaps even EOI it, causing incorrect behaviour. >> >> The race is really insignificant since it can only occur on the first >> interrupt (usually following interrupts will not change TMR), but it's better >> closed than open. >> > The EOI handler clears TMR, so AFAICS it can occur not only on the first > interrupt. > In that case, we ought to queue it for .33 and -stable. -- error compiling committee.c: too many arguments to function