From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqyQC-00030s-7A for qemu-devel@nongnu.org; Tue, 29 Apr 2008 18:35:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqyQB-00030N-9I for qemu-devel@nongnu.org; Tue, 29 Apr 2008 18:35:35 -0400 Received: from [199.232.76.173] (port=52909 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqyQA-00030F-W7 for qemu-devel@nongnu.org; Tue, 29 Apr 2008 18:35:35 -0400 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194] helo=il.qumranet.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JqyQA-0001eK-NO for qemu-devel@nongnu.org; Tue, 29 Apr 2008 18:35:35 -0400 Message-ID: <4817A257.7000800@qumranet.com> Date: Wed, 30 Apr 2008 01:33:59 +0300 From: Avi Kivity MIME-Version: 1.0 References: <12094981963747-git-send-email-gcosta@redhat.com> In-Reply-To: <12094981963747-git-send-email-gcosta@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] [RFC] try to reduce kvm impact in core qemu code. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: kvm-devel@lists.sourceforge.net, glommer@gmail.com, qemu-devel@nongnu.org Glauber Costa wrote: > Hi. This is a proposal for reducing the impact of kvm functions in core qemu > code. This is by all means not ready, but I felt like posting it, so a discussion > on it could follow. > > The idea in this patch is to replace the specific kvm details from core qemu files > like vl.c, with driver_yyy() functions. When kvm is not running, those functions would > just return (most of time), absolutely reducing the impact of kvm code. > > As I wanted to test it, in this patch I changed the kvm functions to be called driver_yyy(), > but that's not my final goal. I intend to use a function pointer schema, similar to what the linux > kernel already do for a lot of its subsystem, to isolate the changes. > > Comments deeply welcome. > While I would be very annoyed if someone referred to kvm as a qemu accelerator, I think accelerator_yyy() is more descriptive than driver_yyy(). I did not see any references to kqemu, but I imagine you mean this to abstract kqemu support as well. Other than that, looks really good. -- Any sufficiently difficult bug is indistinguishable from a feature.