From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH] [RFC] try to reduce kvm impact in core qemu code. Date: Tue, 29 Apr 2008 23:59:14 -0300 Message-ID: <4817E082.2060908@redhat.com> References: <12094981963747-git-send-email-gcosta@redhat.com> <4817A257.7000800@qumranet.com> <4817B0C8.8080301@redhat.com> <4817BD06.5020909@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org, Avi Kivity To: Anthony Liguori Return-path: In-Reply-To: <4817BD06.5020909@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > Glauber Costa wrote: >> Avi Kivity wrote: >> >>> 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(). >>> >> How about booster? ;-) >> > > I don't think the concern from a QEMU perspective is that QEMU is too > intimately tied to KVM. The concern is that overtime, it will be very > difficult to make changes to QEMU without breaking KVM support because > of the shear number of hooks we require. Fabrice had actually suggested > merging libkvm into QEMU. We just need to reduce the overall number of > if (kvm_enabled()) blocks. They are not mutually exclusive. Even if we do merge libkvm into qemu, having it more modular and separated will be way better than having kvm hooks all over. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone