From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3mJ7-0000V0-Fu for qemu-devel@nongnu.org; Wed, 14 Sep 2011 06:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3mJ1-0007O3-D5 for qemu-devel@nongnu.org; Wed, 14 Sep 2011 06:03:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3mJ1-0007Mv-0q for qemu-devel@nongnu.org; Wed, 14 Sep 2011 06:02:59 -0400 Message-ID: <4E707BCE.60100@redhat.com> Date: Wed, 14 Sep 2011 13:02:54 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1315992222-24069-1-git-send-email-avi@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/3] Memory API mutators List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On 09/14/2011 12:56 PM, Peter Maydell wrote: > On 14 September 2011 10:23, Avi Kivity wrote: > > This patchset introduces memory_region_set_enabled() and > > memory_region_set_address() to avoid the requirement on memory > > routers to track the internal state of the memory API (so they know > > whether they need to add or remove a region). Instead, they can > > simply copy the state of the region from the guest-exposed register > > to the memory core, via the new mutator functions. > > > > Please review. Do we need a memory_region_set_size() as well? > > Would set_size() allow things like omap_gpmc() to avoid the need > to create an intermediate container subregion to enforce size > clipping on the child region it's trying to map? I'd recommend not calling _set_size() on somebody else's region - this quickly leads to confusion. Only call set_size() if you also called _init() and will call _destroy(). Can you point me at the code in question? _set_size() may be useful for dynamic bridge windows and the like. > (Strictly speaking what omap_gpmc() wants is not merely clipping > to a guest-specified size but also wrapping, so you can take a > 16MB child region and map the bottom 4MB of it repeating into > a 32MB chunk of address space, say. But that would require a lot > of playing games with aliases to implement a bizarre corner > case that nobody uses in practice.) > That's best done in the memory core, the rendering loop can be adjusted to do this replication. -- error compiling committee.c: too many arguments to function