From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN1vp-0001BB-GV for qemu-devel@nongnu.org; Thu, 19 May 2011 08:02:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QN1vh-0007Cp-QP for qemu-devel@nongnu.org; Thu, 19 May 2011 08:02:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN1vh-0007Cl-EX for qemu-devel@nongnu.org; Thu, 19 May 2011 08:02:13 -0400 Message-ID: <4DD506C1.3040703@redhat.com> Date: Thu, 19 May 2011 15:02:09 +0300 From: Avi Kivity MIME-Version: 1.0 References: <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> <4DD5059B.3070907@siemens.com> <20110519115858.GH28399@redhat.com> In-Reply-To: <20110519115858.GH28399@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; 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: Gleb Natapov Cc: Jan Kiszka , qemu-devel On 05/19/2011 02:58 PM, Gleb Natapov wrote: > > > > Devices shall register their regions with the bus. Every device is on > > some bus, so that's not a problem. And we can then provide registration > > handlers at bus level that either implement specific logic or just > > forward the request to the next hierarchy level (default handler). > > > Yes, I agree with that. I just don't see the need for "priority" parameter > in this model. Priority allows you to register RAM from 0-EOM and overlay it with the ROM and VGA windows as necessary. It also allows PCI to override RAM (or vice versa, however we decide). Sure, you can let the caller chop the various regions manually in the first case, but it's just extra work that can be done in common code. And it cannot be done at all for the second case, if RAM overrides PCI (the PCI bus doesn't know how to chop BARs). -- error compiling committee.c: too many arguments to function