From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 1/2] kvm: x86: Fix racy event propagation in kmv timer Date: Sun, 14 Jun 2009 14:18:11 +0300 Message-ID: <4A34DC73.6070001@redhat.com> References: <4A2E2B3B.5020408@siemens.com> <4A2E657D.5090405@siemens.com> <20090609135907.GA8016@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , kvm-devel To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:34246 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756996AbZFNLSN (ORCPT ); Sun, 14 Jun 2009 07:18:13 -0400 In-Reply-To: <20090609135907.GA8016@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: > On Tue, Jun 09, 2009 at 03:37:01PM +0200, Jan Kiszka wrote: > >> v2 as requested in private discussion: Broken into two pieces, and the >> second one will not change the original semantic. >> >> --------------> >> >> Minor issue that likely had no practical relevance: The kvm timer >> function so far incremented the pending counter and then may reset it >> again to 1 in case reinjection was disabled. This opened a small racy >> window with the corresponding VCPU loop that may have happened to run on >> another (real) CPU and already consumed the value. >> >> Fix it by skipping the incrementation in case pending is already > 0. >> This opens a different race windows, but may only rarely cause lost >> events in case we do not care about them anyway (!reinject). >> >> Signed-off-by: Jan Kiszka >> > > ACK both, thanks. > And applied both, thanks. -- error compiling committee.c: too many arguments to function