From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 05/10] KVM: Merge MSI handling to kvm_set_irq Date: Tue, 30 Dec 2008 13:07:52 +0200 Message-ID: <495A0108.7080606@redhat.com> References: <1230616562-18113-1-git-send-email-sheng@linux.intel.com> <1230616562-18113-6-git-send-email-sheng@linux.intel.com> <4959FC8A.70808@redhat.com> <200812301900.58066.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; 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]:35110 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751479AbYL3LH4 (ORCPT ); Tue, 30 Dec 2008 06:07:56 -0500 In-Reply-To: <200812301900.58066.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: >>> + mutex_lock(&kvm->gsi_msg_lock); >>> >> The lock is already taken here? >> > > Um? For gsi_msg_lock? > Sorry, my mistake. Will have to get used to all those locks. Is there a way to avoid the lock? We're starting to complicate things... >> This looks very messy. Would be better to have the in-kernel irq >> structure contain a (*set_level)() callback that can take the >> appropriate action. >> > > You means this part which would merged with ioapic, or something else? > At the very least, separated into functions. At best, kvm_set_irq() should become generic and just invoke callbacks supplied by the irqchip (pit, ioapic, msi). -- error compiling committee.c: too many arguments to function