From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCpyu-00083E-HH for qemu-devel@nongnu.org; Thu, 31 Jul 2014 09:01:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCpyl-0007WV-Hr for qemu-devel@nongnu.org; Thu, 31 Jul 2014 09:01:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCpyl-0007WK-BV for qemu-devel@nongnu.org; Thu, 31 Jul 2014 09:01:07 -0400 Message-ID: <53DA3E05.1040108@redhat.com> Date: Thu, 31 Jul 2014 15:00:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20140731125321.1600.46604.stgit@PASHA-ISP.novsu.ac.ru> <20140731125401.1600.57793.stgit@PASHA-ISP.novsu.ac.ru> In-Reply-To: <20140731125401.1600.57793.stgit@PASHA-ISP.novsu.ac.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v3 06/49] serial: fixing vmstate for save/restore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, afaerber@suse.de, fred.konrad@greensocs.com Il 31/07/2014 14:54, Pavel Dovgalyuk ha scritto: > +static bool serial_thr_ipending_needed(void *opaque) > +{ > + SerialState *s = (SerialState *)opaque; > + return (s->iir & UART_IIR_ID) != UART_IIR_THRI; > +} This is not correct, as you pointed out in our earlier discussion. thr_ipending is independent from s->iir, it just happens that s->iir is a good way to fetch the common value of thr_ipending and thus avoid streaming the subsection in most cases. > const VMStateDescription vmstate_serial = { > .name = "serial", > - .version_id = 3, > + .version_id = 4, As usual, this is not necessary. Paolo > .minimum_version_id = 2, > .pre_save = serial_pre_save, > + .pre_load = serial_pre_load,