From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRODi-0001RN-N6 for qemu-devel@nongnu.org; Tue, 09 Sep 2014 12:24:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRODc-00058k-DR for qemu-devel@nongnu.org; Tue, 09 Sep 2014 12:24:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRODc-00058Y-4e for qemu-devel@nongnu.org; Tue, 09 Sep 2014 12:24:36 -0400 Message-ID: <540F29BB.8010202@redhat.com> Date: Tue, 09 Sep 2014 18:24:27 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1410265809-27247-1-git-send-email-pbonzini@redhat.com> <1410265809-27247-8-git-send-email-pbonzini@redhat.com> <87r3zk28th.fsf@troll.troll> In-Reply-To: <87r3zk28th.fsf@troll.troll> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit 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: quintela@redhat.com Cc: amit.shah@redhat.com, qemu-devel@nongnu.org, Pavel.Dovgaluk@ispras.ru, dgilbert@redhat.com Il 09/09/2014 15:59, Juan Quintela ha scritto: > If it is still -1 at this point, we "calculate" a value for it. > (I assume it is right, no knowledge of serial port) Not necessarily right, or we wouldn't need the subsection, but at least a decent approximation. > 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. Paolo