From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN5ur-0000R8-0I for qemu-devel@nongnu.org; Thu, 19 May 2011 12:17:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QN5up-0002XM-Pg for qemu-devel@nongnu.org; Thu, 19 May 2011 12:17:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN5up-0002XA-IE for qemu-devel@nongnu.org; Thu, 19 May 2011 12:17:35 -0400 Date: Thu, 19 May 2011 19:17:31 +0300 From: Gleb Natapov Message-ID: <20110519161731.GA27310@redhat.com> References: <4DD51A82.7060205@siemens.com> <4DD51B64.8000306@redhat.com> <4DD51FDA.3010107@codemonkey.ws> <4DD520ED.8010606@redhat.com> <4DD5260A.1080309@codemonkey.ws> <4DD5272F.5000003@siemens.com> <4DD52848.6030102@codemonkey.ws> <4DD52910.4080106@siemens.com> <4DD52B0E.2080604@codemonkey.ws> <4DD52BF2.2080506@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DD52BF2.2080506@redhat.com> Subject: Re: [Qemu-devel] [RFC] Memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Jan Kiszka , qemu-devel On Thu, May 19, 2011 at 05:40:50PM +0300, Avi Kivity wrote: > On 05/19/2011 05:37 PM, Anthony Liguori wrote: > > > >So.... do you do: > > > >isa_register_region(ISABus *bus, MemoryRegion *mr, int priority) > >{ > > chipset_register_region(bus->chipset, mr, priority + 1); > >} > > > >I don't really understand how you can fold everything into one > >table and not allow devices to override their parents using > >priorities. > > Think of how a window manager folds windows with priorities onto a > flat framebuffer. > > You do a depth-first walk of the tree. For each child list, you > iterate it from the lowest to highest priority, allowing later > subregions override earlier subregions. > And how you set those priorities in a sensible way? Why two device on a PCI bus will want to register their memory region with anything but highest priority? And if you let PCI subsystem to assign priorities how it will coordinate with ISA subsystem/memory controller what priorities to assign to get meaningful system? -- Gleb.