From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/3] KVM: Interrupt mask notifiers for ioapic Date: Mon, 05 Jan 2009 15:24:07 +0200 Message-ID: <496209F7.6030007@redhat.com> References: <1231085685-32201-1-git-send-email-avi@redhat.com> <1231085685-32201-3-git-send-email-avi@redhat.com> <200901051506.15661.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:54767 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752981AbZAENYL (ORCPT ); Mon, 5 Jan 2009 08:24:11 -0500 In-Reply-To: <200901051506.15661.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > On Monday 05 January 2009 00:14:44 Avi Kivity wrote: > >> Allow clients to request notifications when the guest masks or unmasks a >> particular irq line. This complements irq ack notifications, as the guest >> will not ack an irq line that is masked. >> >> Currently implemented for the ioapic only. >> > > Hi Avi > > Need a lock for this list? Seems kvm_fire_mask_notifiers() implicit holding > kvm->lock, but register/unregister didn't. And I think we need some comments > for the necessary of lock. > Good catch. Everything in struct kvm is protected by kvm->lock (except vcpus and the mmu... need a locking document). I added locking around PIT creation so now registration is also protected (it also fixes a potential leak if two threads try to create a PIT simultaneously). -- error compiling committee.c: too many arguments to function