From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6Fnc-0004rT-Q5 for qemu-devel@nongnu.org; Tue, 28 Aug 2012 03:01:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6FnY-000194-BJ for qemu-devel@nongnu.org; Tue, 28 Aug 2012 03:01:20 -0400 Received: from mail.ispras.ru ([83.149.199.43]:40865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6FnY-00018x-3i for qemu-devel@nongnu.org; Tue, 28 Aug 2012 03:01:16 -0400 From: "Pavel Dovgaluk" References: <503b6650.c88ddc0a.7e15.ffffb689SMTPIN_ADDED@mx.google.com> In-Reply-To: Date: Tue, 28 Aug 2012 11:01:15 +0400 Message-ID: <002801cd84ea$ea756bf0$bf6043d0$@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] [PATCH] Save/load PC speaker internal state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Peter Maydell' , 'Jan Kiszka' Cc: 'qemu-devel' > -----Original Message----- > From: Peter Maydell [mailto:peter.maydell@linaro.org] > Sent: Monday, August 27, 2012 4:50 PM > To: Pavel Dovgaluk > Cc: qemu-devel > Subject: Re: [Qemu-devel] [PATCH] Save/load PC speaker internal state > > On 27 August 2012 13:21, Pavel Dovgaluk wrote: > > Save PC speaker state to remove differences between system > > states after saving the snapshot and after loading it again. > > This patch is needed for deterministic replay of the execution. > > > > Signed-off-by: Pavel Dovgalyuk > > Hi Pavel; thanks for this patch. Couple of minor issues: > > > +static const VMStateDescription vmstate_spk = { > > + .name = "pcspk", > > + .version_id = 1, > > + .minimum_version_id = 1, > > + .minimum_version_id_old = 1, > > + .fields = (VMStateField[]) { > > + VMSTATE_UINT8_ARRAY(sample_buf, PCSpkState, PCSPK_BUF_LEN), > > + VMSTATE_UINT32(pit_count, PCSpkState), > > + VMSTATE_UINT32(samples, PCSpkState), > > + VMSTATE_UINT32(play_pos, PCSpkState), > > + VMSTATE_INT32(data_on, PCSpkState), > > + VMSTATE_INT32(dummy_refresh_clock, PCSpkState), > > I think that you need also to update the types in the PCSpkState > struct from int/unsigned int to int32_t/uint32_t, otherwise this > won't compile on a 64 bit system. Peter, Jan, thank you for the reviews. I've sent new version of the patch. Pavel Dovgaluk