From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNLsw-0002c0-KI for qemu-devel@nongnu.org; Fri, 20 May 2011 05:20:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNLsv-0000NA-Ky for qemu-devel@nongnu.org; Fri, 20 May 2011 05:20:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNLsv-0000M9-Ba for qemu-devel@nongnu.org; Fri, 20 May 2011 05:20:41 -0400 Message-ID: <4DD63263.7090106@redhat.com> Date: Fri, 20 May 2011 12:20:35 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1305814352-15044-1-git-send-email-avi@redhat.com> <1305814352-15044-2-git-send-email-avi@redhat.com> <4DD56F3B.70205@web.de> In-Reply-To: <4DD56F3B.70205@web.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 05/19/2011 10:27 PM, Jan Kiszka wrote: > On 2011-05-19 16:12, Avi Kivity wrote: > > +/* Sets an offset to be added to MemoryRegionOps callbacks. */ > > +void memory_region_set_offset(MemoryRegion *mr, target_phys_addr_t offset); > > Please mark this as a legacy helper, ideally to be removed after the > complete conversion to this API. During that phase we should try to > identify those devices which still depend on offset=0 and maybe directly > fix them. Okay. > > +/* Turn loggging on or off for specified client (display, migration) */ > > +void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client); > > +/* Enable memory coalescing for the region. MMIO ->write callbacks may be > > + * delayed until a non-coalesced MMIO is issued. > > + */ > > +void memory_region_set_coalescing(MemoryRegion *mr); > > +/* Enable memory coalescing for a sub-range of the region. MMIO ->write > > + * callbacks may be delayed until a non-coalesced MMIO is issued. > > + */ > > +void memory_region_add_coalescing(MemoryRegion *mr, > > + target_phys_addr_t offset, > > + target_phys_addr_t size); > > Will this be such a common use case that requesting the user to split up > the region and then use set_coalescing will generate too much boiler > plate code? Look at e1000, coalescing ranges have byte granularity. > > +/* Disable MMIO coalescing for the region. */ > > +void memory_region_clear_coalescing(MemoryRegion *mr); > > And what about clearing coalescing for sub-ranges? Clear them all and rebuild. > Maybe skip > add_coalescing for the first run and see how far we get. We get as far as e. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.