Received: from eggs.gnu.org ([2001:4830:134:3::10]:43834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCPBD-0000gW-PF for qemu-devel@nongnu.org; Wed, 30 Jul 2014 04:24:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCPB6-0006ey-A6 for qemu-devel@nongnu.org; Wed, 30 Jul 2014 04:24:11 -0400 Received: from mail.ispras.ru ([83.149.199.45]:54020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCPB6-0006ee-2N for qemu-devel@nongnu.org; Wed, 30 Jul 2014 04:24:04 -0400 From: "Pavel Dovgaluk" References: <20140717110153.8352.80175.stgit@PASHA-ISP> <20140717110255.8352.73575.stgit@PASHA-ISP> <53D61AE3.6000700@redhat.com> <37740.9009532586$1406541296@news.gmane.org> <53D621F5.9050906@redhat.com> In-Reply-To: <53D621F5.9050906@redhat.com> Date: Wed, 30 Jul 2014 12:24:04 +0400 Message-ID: <000201cfabcf$a0568b40$e103a1c0$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmstate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, fred.konrad@greensocs.com > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini > Il 28/07/2014 11:54, Pavel Dovgaluk ha scritto: > >>> > > + VMSTATE_TIMER_V(timer, RTL8139State, 5), > >> > > >> > timer need not be migrated, because it is reinstated by rtl8139_post_load. > >> > > > That's true for normal execution. > > In replay execution mode post_load can be called before cached virtual clock > > values are loaded. This may cause invalid setting of the timer and raising > > an IRQ which didn't happen in record mode. > > I will update this patch to fix post_load function and avoid this > > non-deterministic behavior. > > This is what worries me of this series. These invariants are not > documented anywhere, and people will break them unless you add > assertions that also hold in normal mode. Assertions is a good idea, we added such warning message to qemu_get_timedate function to be sure, that it is used correctly with replay. Another thing, that could help for making snapshots - find a way to load replay structures before all other ones. Are there any priorities in migration states list? Priorities could also solve some other issues, because sometimes post_load function of one device uses other devices' functions. And the second ones could be not loaded yet. Pavel Dovgalyuk