From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSOYT-0000Ft-JJ for qemu-devel@nongnu.org; Tue, 25 Mar 2014 06:26:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSOYL-0003MW-2s for qemu-devel@nongnu.org; Tue, 25 Mar 2014 06:26:01 -0400 Received: from [2001:41d0:8:2b42::1] (port=48692 helo=greensocs.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSOYK-0003MO-Su for qemu-devel@nongnu.org; Tue, 25 Mar 2014 06:25:53 -0400 Message-ID: <533159AF.9000204@greensocs.com> Date: Tue, 25 Mar 2014 11:25:51 +0100 From: Frederic Konrad MIME-Version: 1.0 References: <1395429454-24690-1-git-send-email-fred.konrad@greensocs.com> <1395429454-24690-3-git-send-email-fred.konrad@greensocs.com> <532D5070.5050807@redhat.com> <5330460F.8020807@greensocs.com> <53305267.9070308@redhat.com> In-Reply-To: <53305267.9070308@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 02/12] migration: migrate icount fields. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: mark.burton@greensocs.com On 24/03/2014 16:42, Paolo Bonzini wrote: > Il 24/03/2014 15:49, Frederic Konrad ha scritto: >> --- a/cpus.c >> +++ b/cpus.c >> @@ -427,6 +427,26 @@ void qemu_clock_warp(QEMUClockType type) >> } >> } >> >> +static bool icount_state_needed(void *opaque) >> +{ >> + return (use_icount != 0); >> +} >> + >> +/* >> + * This is a subsection for icount migration. >> + */ >> +static const VMStateDescription icount_vmstate_timers = { >> + .name = "icount", >> + .version_id = 2, > > 1 here. > >> + .minimum_version_id = 1, >> + .minimum_version_id_old = 1, >> + .fields = (VMStateField[]) { >> + VMSTATE_INT64(qemu_icount_bias, TimersState), >> + VMSTATE_INT64(qemu_icount, TimersState), >> + VMSTATE_END_OF_LIST() >> + } >> +}; >> + >> static const VMStateDescription vmstate_timers = { >> .name = "timer", >> .version_id = 2, >> @@ -437,6 +457,14 @@ static const VMStateDescription vmstate_timers = { >> VMSTATE_INT64(dummy, TimersState), >> VMSTATE_INT64_V(cpu_clock_offset, TimersState, 2), >> VMSTATE_END_OF_LIST() >> + }, >> + .subsections = (VMStateSubsection[]) { >> + { >> + .vmsd = &icount_vmstate_timers, >> + .needed = icount_state_needed, >> + }, { >> + /* empty */ >> + } >> } >> }; >> >> Thanks, >> Fred > > Yes, quite exactly that part from the version_id. If you can test it, > this patch would be good for 2.0 too. > > Paolo > Seems there is a little issue somewhere: Unknown savevm section type 5 I'll try to debug this. Fred