From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBLH2-0007Og-0Z for qemu-devel@nongnu.org; Tue, 11 Sep 2012 03:52:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBLH0-0007Kx-Ns for qemu-devel@nongnu.org; Tue, 11 Sep 2012 03:52:43 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:40218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBLH0-0007Kq-Hs for qemu-devel@nongnu.org; Tue, 11 Sep 2012 03:52:42 -0400 Received: by pbbrp12 with SMTP id rp12so439967pbb.4 for ; Tue, 11 Sep 2012 00:52:41 -0700 (PDT) From: Liu Ping Fan Date: Tue, 11 Sep 2012 15:51:46 +0800 Message-Id: <1347349912-15611-6-git-send-email-qemulist@gmail.com> In-Reply-To: <1347349912-15611-1-git-send-email-qemulist@gmail.com> References: <1347349912-15611-1-git-send-email-qemulist@gmail.com> Subject: [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: qemu-devel@nongnu.org Cc: Jan Kiszka , Marcelo Tosatti , Avi Kivity , Anthony Liguori , Paolo Bonzini From: Liu Ping Fan This pair of interface help to decide when dispatching, whether we can pin mr without big lock or not. Signed-off-by: Liu Ping Fan --- memory.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/memory.h b/memory.h index bd1bbae..9039411 100644 --- a/memory.h +++ b/memory.h @@ -25,6 +25,7 @@ #include "iorange.h" #include "ioport.h" #include "int128.h" +#include "qemu/object.h" 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); enum device_endian endianness; /* Guest-visible constraints: */ -- 1.7.4.4