From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuFQK-0006CX-8r for qemu-devel@nongnu.org; Tue, 10 Jun 2014 02:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuFQF-0004YK-B1 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 02:20:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuFQF-0004YC-3X for qemu-devel@nongnu.org; Tue, 10 Jun 2014 02:20:39 -0400 Date: Tue, 10 Jun 2014 11:50:18 +0530 From: Amit Shah Message-ID: <20140610062018.GF27148@grmbl.mre> References: <1400252448-13347-1-git-send-email-fred.konrad@greensocs.com> <1400252448-13347-3-git-send-email-fred.konrad@greensocs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400252448-13347-3-git-send-email-fred.konrad@greensocs.com> Subject: Re: [Qemu-devel] [RFC PATCH v3 02/13] migration: migrate icount fields. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fred.konrad@greensocs.com Cc: Juan Quintela , mark.burton@greensocs.com, qemu-devel@nongnu.org, "Dr. David Alan Gilbert" , pbonzini@redhat.com, vilanova@ac.upc.edu On (Fri) 16 May 2014 [17:00:37], fred.konrad@greensocs.com wrote: > From: KONRAD Frederic > > This fixes a bug where qemu_icount and qemu_icount_bias are not migrated. > It adds a subsection "timer/icount" to vmstate_timers so icount is migrated only > when needed. > > Signed-off-by: KONRAD Frederic Reviewed-by: Amit Shah > +static bool icount_state_needed(void *opaque) > +{ > + return (use_icount != 0); > +} You can just say 'return use_icount;' here instead. Amit