Received: from eggs.gnu.org ([2001:4830:134:3::10]:44132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRg0w-000866-Uo for qemu-devel@nongnu.org; Wed, 10 Sep 2014 07:24:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRg0p-00020o-9l for qemu-devel@nongnu.org; Wed, 10 Sep 2014 07:24:42 -0400 Received: from mail.ispras.ru ([83.149.199.45]:58634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRg0p-00020R-1o for qemu-devel@nongnu.org; Wed, 10 Sep 2014 07:24:35 -0400 From: "Pavel Dovgaluk" References: <1410265809-27247-1-git-send-email-pbonzini@redhat.com> <1410265809-27247-8-git-send-email-pbonzini@redhat.com> <87r3zk28th.fsf@troll.troll> <540F29BB.8010202@redhat.com> In-Reply-To: <540F29BB.8010202@redhat.com> Date: Wed, 10 Sep 2014 15:24:34 +0400 Message-ID: <000401cfcce9$cc721ab0$65565010$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH 07/10] serial: fixing vmstate for save/restore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , quintela@redhat.com Cc: amit.shah@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > Il 09/09/2014 15:59, Juan Quintela ha scritto: > > But poll_msl is "more" interesting, because we are not "reseting it". > > > > So, we have that if we are migrating from an old version, we would have > > poll_msl == -1, and we used to have it to poll_msl == 0. > > > > Should we change it? > > > > I think that putting: > > > > s->poll_msl = 0; > > > > in preload, and > > > > static bool serial_poll_needed(void *opaque) > > { > > SerialState *s = opaque; > > return s->poll_msl != 0; > > } > > > > would give exactly the same behaviour for new qemus, and behave better > > for older ones? > > poll_msl is usually -1, so the "needed" function must be like Pavel wrote. > > poll_msl is only used for serial port passthrough, which I guess we can > say "just doesn't work" for migration on < 2.1. In fact, putting > migration + passthrough together is probably not a great idea. :) We > probably could drop ust the poll_msl/modem_status_poll subsection, but I > assume Pavel had some kind of test case. I have an example for record/replay. Record can work with passthrough enabled. And it usually saves some vmstates. In replay mode we emulate passthrough by sending data read from the log as they were received from the real device. That's why we need correct state recovery even for these fields. Pavel Dovgalyuk