From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNS6y-0004k6-VN for qemu-devel@nongnu.org; Fri, 20 May 2011 11:59:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNS6y-0002Us-69 for qemu-devel@nongnu.org; Fri, 20 May 2011 11:59:36 -0400 Received: from thoth.sbs.de ([192.35.17.2]:23166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNS6x-0002Un-Tu for qemu-devel@nongnu.org; Fri, 20 May 2011 11:59:36 -0400 Message-ID: <4DD68FE5.1010506@siemens.com> Date: Fri, 20 May 2011 17:59:33 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4DD3D236.90708@siemens.com> <4DD3D95E.2060105@redhat.com> <4DD3E1B3.3020405@siemens.com> <4DD3E47F.9060104@redhat.com> <4DD3E782.8090208@siemens.com> <4DD3E8D6.6090807@redhat.com> <20110519090851.GD28399@redhat.com> <4DD4DE8E.8030402@redhat.com> <20110519091404.GE28399@redhat.com> <4DD5029D.6000700@redhat.com> <20110519115405.GG28399@redhat.com> <4DD505C4.6010604@redhat.com> <4DD50B17.7000205@siemens.com> <4DD511FB.3080901@redhat.com> <4DD51413.1050202@siemens.com> <4DD51468.7050509@redhat.com> <4DD51531.7000701@siemens.com> <4DD515F9.1020902@redhat.com> <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> <4DD54611.6090505@codemonkey.ws> <4DD62E01.5010600@redhat.com> <4DD689BA.8020106@codemonkey.ws> In-Reply-To: <4DD689BA.8020106@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 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: Avi Kivity , Gleb Natapov , qemu-devel On 2011-05-20 17:33, Anthony Liguori wrote: > On 05/20/2011 04:01 AM, Avi Kivity wrote: >> On 05/19/2011 07:32 PM, Anthony Liguori wrote: >>>> 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. >>>> >>> >>> >>> Okay, but this doesn't explain how you'll let RAM override the VGA >>> mapping since RAM is not represented in the same child list as VGA >>> (RAM is a child of the PMC whereas VGA is a child of ISA/PCI, both of >>> which are at least one level removed from the PMC). >> >> VGA will override RAM. >> >> Memory controller >> | >> +-- RAM container (prio 0) >> | >> +-- PCI container (prio 1) >> | >> +--- vga window > > Unless the RAM controller increases it's priority, right? That's how > you would implement SMM, by doing priority++? > > But if you have: > > Memory controller > | > +-- RAM container (prio 0) > | > +-- PCI container (prio 1) > | > +-- PCI-X container (prio 2) > | > +--- vga window > > Now you need to do priority = 3? > > Jan had mentioned previously about registering a new temporary window. > I assume the registration always gets highest_priority++, or do you have > to explicitly specify that PCI container gets priority=1? The latter. And I really prefer to have this explicit over deriving the priority from the registration order. That's way too fragile/unhandy. If you decide to replace a region of lower priority later on, you need to reregister everything at that level. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux