From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N20JW-000390-Vo for qemu-devel@nongnu.org; Sun, 25 Oct 2009 06:27:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N20JP-000370-1V for qemu-devel@nongnu.org; Sun, 25 Oct 2009 06:27:03 -0400 Received: from [199.232.76.173] (port=54611 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N20JL-00036c-Kp for qemu-devel@nongnu.org; Sun, 25 Oct 2009 06:26:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8671) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N20JK-0001rw-IS for qemu-devel@nongnu.org; Sun, 25 Oct 2009 06:26:54 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9PAQrng019756 for ; Sun, 25 Oct 2009 06:26:53 -0400 Message-ID: <4AE427EB.7080602@redhat.com> Date: Sun, 25 Oct 2009 12:26:51 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] in-kernel irqchip : split devices References: <20091014143042.GD8092@mothafucka.localdomain> In-Reply-To: <20091014143042.GD8092@mothafucka.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: qemu-devel@nongnu.org On 10/14/2009 04:30 PM, Glauber Costa wrote: > Hello people, > > As I promised, I am sending a very brief PoC wrt split devices and in-kernel irqchip. > In this mail, I am including only the ioapic version for apreciation. I also have i8259, > and apic will take me a little bit more. This is just to try to bind the discussion to real > code. > > I still can't say I like it. The reset function is duplicated, the state representation (which is an ABI) is gratuitously forked. You can't save/restore in-kernel irqchip and userspace irqchip, even though where the code is located is an implementation detail. While we may not care much for the ioapic, it sets a bad precedent for vhost-net, where we'd like to migrate from non-vhost-net hosts to vhost-net hosts without the user noticing anything. > Note that we end up with a very slim representation of the device, and the code is much less > confusing, IMHO. > You can always remove if statements by duplicating the code and pushing the if one level upwards. In total, there is more code, and it is more confusing (since you need to deal with implementation details at a higher level). -- error compiling committee.c: too many arguments to function