From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPiiO-0007mv-Ca for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:26:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPiiN-0007lW-B3 for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:26:15 -0500 Received: from [199.232.76.173] (port=43583 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPiiN-0007l9-2J for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:26:15 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:43467) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPiiM-0002ph-PQ for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:26:14 -0500 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0LJOibf000460 for ; Wed, 21 Jan 2009 14:24:44 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0LJQD6u191014 for ; Wed, 21 Jan 2009 14:26:13 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0LJQDvR019513 for ; Wed, 21 Jan 2009 14:26:13 -0500 Message-ID: <497776C9.5050309@us.ibm.com> Date: Wed, 21 Jan 2009 13:26:01 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/6] Bypass tcg memory functions -v1.0-2009 References: <1232477465-32386-1-git-send-email-glommer@redhat.com> <200901210543.07538.paul@codesourcery.com> In-Reply-To: <200901210543.07538.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Glauber Costa , qemu-devel@nongnu.org Paul Brook wrote: > On Tuesday 20 January 2009, Glauber Costa wrote: > >> This series is not very different from the last one that did it. >> Just bringing it back from my vacations. Idea is to replace tcg >> memory functions with kvm's, selectable at runtime. Right now >> we use a conditional selection. In the future, we might use >> function pointers to allow for easy coupling of any hypervisor. >> > > I dislike that you're introducing two different ways or doing the same thing. > Duplicating all the memory region tracking code seems like a bad way to solve > this problem. > To me, this patch set is really about defining the memory API for QEMU's CPU emulation/virtualization core. It can be made a lot prettier by introducing function pointers and such but doing the separation and having two implementations is the first step in that direction. I believe this is the right level of abstraction. Trying to make shared code with a lower level interface is much more complicated because TCG has some need for deep hooks in the memory code. If TCG ever wants to use memory slots instead of a tree, I'd rather see common code abstracted into a set of libs than making the slot code the main code with hooks for TCG. A big part of the reason for these patches is to make it possible to build QEMU without TCG in an architecturally clean way. Regards, Anthony Liguori > Paul >