From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting Date: Sat, 23 Feb 2013 16:52:59 -0300 Message-ID: <20130223195259.GA24760@amt.cnet> References: <1361540552-2016-1-git-send-email-yang.z.zhang@intel.com> <1361540552-2016-3-git-send-email-yang.z.zhang@intel.com> <20130223134309.GA2632@amt.cnet> <20130223143530.GA25155@redhat.com> <20130223144854.GA5618@amt.cnet> <20130223153144.GB25155@redhat.com> <20130223170513.GB8236@amt.cnet> <20130223194214.GD25155@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Zhang, Yang Z" , "kvm@vger.kernel.org" , "avi.kivity@gmail.com" , "Zhang, Xiantao" To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8027 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757036Ab3BWTxP (ORCPT ); Sat, 23 Feb 2013 14:53:15 -0500 Content-Disposition: inline In-Reply-To: <20130223194214.GD25155@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, Feb 23, 2013 at 09:42:14PM +0200, Gleb Natapov wrote: > > explanation why its believed to be benign (given how the injection > > return value is interpreted) could also work. Its ugly, though... murphy > > is around. > The race above is not benign. It will report interrupt as coalesced > while in reality it is injected. This may cause to many interrupt to be > injected. If this happens rare enough ntp may be able to fix time drift > resulted from this. OK. > > OTOH spinlock is not the end of the world, can figure out something later > > (we've tried without success so far). > It serializes all injections into vcpu. I do not believe now that even > with lock we are safe for the reason I mention above. We can use pir->on > bit as a lock, but that only emphasise how ridiculous serialization of > injections becomes. Please review the 2nd iteration of pseudocode in patchset v4 thread, it should be good.