From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBLWt-0004T3-0w for qemu-devel@nongnu.org; Tue, 11 Sep 2012 04:09:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBLWm-0003kO-5x for qemu-devel@nongnu.org; Tue, 11 Sep 2012 04:09:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBLWl-0003kK-Te for qemu-devel@nongnu.org; Tue, 11 Sep 2012 04:09:00 -0400 Message-ID: <504EF196.1020709@redhat.com> Date: Tue, 11 Sep 2012 11:08:54 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1347349912-15611-1-git-send-email-qemulist@gmail.com> <1347349912-15611-6-git-send-email-qemulist@gmail.com> In-Reply-To: <1347349912-15611-6-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V3 05/11] memory: introduce ref, unref interface for MemoryRegionOps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, Anthony Liguori , Paolo Bonzini On 09/11/2012 10:51 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > This pair of interface help to decide when dispatching, whether > we can pin mr without big lock or not. > > --- a/memory.h > +++ b/memory.h > @@ -25,6 +25,7 @@ > #include "iorange.h" > #include "ioport.h" > #include "int128.h" > +#include "qemu/object.h" Not needed. > > typedef struct MemoryRegionOps MemoryRegionOps; > typedef struct MemoryRegion MemoryRegion; > @@ -66,6 +67,8 @@ struct MemoryRegionOps { > target_phys_addr_t addr, > uint64_t data, > unsigned size); > + int (*ref)(MemoryRegion *mr); > + void (*unref)(MemoryRegion *mr); > Please add documentation, esp. that the operations are optional. -- error compiling committee.c: too many arguments to function