From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4742] Fix vm state save/load
Date: Fri, 13 Jun 2008 18:17:00 +0000 [thread overview]
Message-ID: <E1K7Dpc-0001H8-Dk@cvs.savannah.gnu.org> (raw)
Revision: 4742
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4742
Author: malc
Date: 2008-06-13 18:16:59 +0000 (Fri, 13 Jun 2008)
Log Message:
-----------
Fix vm state save/load
Modified Paths:
--------------
trunk/hw/cs4231a.c
Modified: trunk/hw/cs4231a.c
===================================================================
--- trunk/hw/cs4231a.c 2008-06-13 10:48:22 UTC (rev 4741)
+++ trunk/hw/cs4231a.c 2008-06-13 18:16:59 UTC (rev 4742)
@@ -601,17 +601,23 @@
{
CSState *s = opaque;
unsigned int i;
+ uint32_t val;
for (i = 0; i < CS_REGS; i++)
qemu_put_be32s(f, &s->regs[i]);
qemu_put_buffer(f, s->dregs, CS_DREGS);
+ val = s->dma_running; qemu_put_be32s(f, &val);
+ val = s->audio_free; qemu_put_be32s(f, &val);
+ val = s->transferred; qemu_put_be32s(f, &val);
+ val = s->aci_counter; qemu_put_be32s(f, &val);
}
static int cs_load(QEMUFile *f, void *opaque, int version_id)
{
CSState *s = opaque;
unsigned int i;
+ uint32_t val, dma_running;
if (version_id > 1)
return -EINVAL;
@@ -620,6 +626,13 @@
qemu_get_be32s(f, &s->regs[i]);
qemu_get_buffer(f, s->dregs, CS_DREGS);
+
+ qemu_get_be32s(f, &dma_running);
+ qemu_get_be32s(f, &val); s->audio_free = val;
+ qemu_get_be32s(f, &val); s->transferred = val;
+ qemu_get_be32s(f, &val); s->aci_counter = val;
+ if (dma_running && (s->dregs[Interface_Configuration] & PEN))
+ cs_reset_voices (s, s->dregs[FS_And_Playback_Data_Format]);
return 0;
}
reply other threads:[~2008-06-13 18:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1K7Dpc-0001H8-Dk@cvs.savannah.gnu.org \
--to=av1474@comtv.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).