From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws86V-0004b1-Al for qemu-devel@nongnu.org; Wed, 04 Jun 2014 06:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ws86M-0001yE-A5 for qemu-devel@nongnu.org; Wed, 04 Jun 2014 06:07:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ws86M-0001yA-1j for qemu-devel@nongnu.org; Wed, 04 Jun 2014 06:07:22 -0400 From: Juan Quintela In-Reply-To: <1401863911-5947-2-git-send-email-sanidhya.iiith@gmail.com> (Sanidhya Kashyap's message of "Wed, 4 Jun 2014 12:08:24 +0530") References: <1401863911-5947-1-git-send-email-sanidhya.iiith@gmail.com> <1401863911-5947-2-git-send-email-sanidhya.iiith@gmail.com> Date: Wed, 04 Jun 2014 12:07:18 +0200 Message-ID: <8761kht2cp.fsf@troll.troll> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 1/8] enable sharing of the function between migration and bitmap dump Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sanidhya Kashyap Cc: qemu list , "Dr. David Alan Gilbert" Sanidhya Kashyap wrote: > As advised by Eric, I have enabled sharing of the function between of the > function that syncs the dirty bitmap obtained via kvm ioctl. I have tried > to make the least changes to the functions by concentrating only on the > function definitions. > > Signed-off-by: Sanidhya Kashyap > --- > arch_init.c | 19 +++++++++++-------- > include/exec/ram_addr.h | 4 ++++ > 2 files changed, 15 insertions(+), 8 deletions(-) > > diff --git a/arch_init.c b/arch_init.c > index 685ba0e..48eb90a 100644 > --- a/arch_init.c > +++ b/arch_init.c > @@ -434,20 +434,22 @@ ram_addr_t migration_bitmap_find_and_reset_dirty(MemoryRegion *mr, > return (next - base) << TARGET_PAGE_BITS; > } > > -static inline bool migration_bitmap_set_dirty(ram_addr_t addr) > +static inline bool bitmap_set_dirty(ram_addr_t addr, unsigned long *bitmap, > + bool migration_flag) Exporting a function without a prefix could be dangerous. Later, Juan.