From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN3SH-0004TG-00 for qemu-devel@nongnu.org; Thu, 19 May 2011 09:39:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QN3SF-0007zp-TF for qemu-devel@nongnu.org; Thu, 19 May 2011 09:39:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN3SF-0007ze-Kh for qemu-devel@nongnu.org; Thu, 19 May 2011 09:39:55 -0400 Message-ID: <4DD51DA6.6050105@redhat.com> Date: Thu, 19 May 2011 16:39:50 +0300 From: Avi Kivity MIME-Version: 1.0 References: <4DD3C5B9.1080908@redhat.com> <4DD3D236.90708@siemens.com> <4DD3D95E.2060105@redhat.com> <4DD3E1B3.3020405@siemens.com> <4DD3E610.1080201@siemens.com> <4DD4199E.2000702@codemonkey.ws> <4DD4B94C.3070700@web.de> <4DD519DE.90608@codemonkey.ws> <4DD51A90.2030108@redhat.com> <4DD51C9C.70600@codemonkey.ws> In-Reply-To: <4DD51C9C.70600@codemonkey.ws> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Jan Kiszka , qemu-devel On 05/19/2011 04:35 PM, Anthony Liguori wrote: > On 05/19/2011 08:26 AM, Avi Kivity wrote: >> On 05/19/2011 04:23 PM, Anthony Liguori wrote: >>>> Actually, things are a bit more complicated: This layer has to >>>> properly >>>> adopt the coalescing properties of underlying regions or we cause >>>> performance regressions to VGA emulation. That means it has to >>>> register >>>> dispatching slots of the corresponding size and set the coalescing >>>> flag >>>> accordingly. And it likely need to adjust them as the regions below >>>> change. >>> >>> >>> As I mentioned in another thread, I don't think we want to "design" >>> coalescing into the API. Coalescing is something that breaks through >>> abstractions layers and is really just a hack. >> >> It's impossible not to design it into the API. The layer which wants to >> do coalescing (the device) has no idea if and where its memory is >> mapped. > > There's two places coalescing currently matters: VGA and PCI devices. > Since VGA is just a special PCI device, let's just focus on PCI devices. > > The PCI bus knows exactly where the memory is mapped. The PCI bus doesn't know about coalescing. Only the device does. Look at e1000 for an example. Cirrus also enables/disables coalescing dynamically. > Yes, if you have complex IOMMU hierarchies it doesn't, but this is my > point. We don't need to design coalesced IO to support these sort of > complex hierarchies. > Are we aiming at our own feet again? Look at the API, it adds three functions that non-users need not care about. -- error compiling committee.c: too many arguments to function