From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC][PATCH 0/2] Fix guest shared interrupt with in-kernel irqchip Date: Sat, 04 Oct 2008 11:45:02 +0300 Message-ID: <48E72D0E.4020902@redhat.com> References: <48E4CC36.70607@redhat.com> <20081002164559.GA16709@yukikaze> <200810031306.53295.amit.shah@redhat.com> <20081003103754.GA29951@yukikaze> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Amit Shah , Avi Kivity , "Yang, Sheng" , "'kvm@vger.kernel.org'" , sheng@linux.intel.com Return-path: Received: from mx2.redhat.com ([66.187.237.31]:36290 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751918AbYJDIrC (ORCPT ); Sat, 4 Oct 2008 04:47:02 -0400 In-Reply-To: <20081003103754.GA29951@yukikaze> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > Derived from Avi's suggestion, now every call of kvm_set_irq() should offer > a irq_source_id, which is allocated by kvm_allocate_irq_sources(). We based > on irq_source_id to identify irq source and implement logical OR for shared > level interrupts. > > The allocated irq_source_id can be freed by kvm_free_irq_sources(). > > > + > + u32 irq_sources_bitmap; > + u32 irq_states[KVM_IOAPIC_NUM_PINS]; > You're using the bit manipulation functions on this, which use unsigned long parameters. This will generate unaligned accesses, which will probably annoy ia64 when this code is ported. So it may be better to wast some space and use unsigned longs here. Other than that, looks a nice and clean to me. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.