From: "Andreas Färber" <afaerber@suse.de>
To: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>,
Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-stable@nongnu.org, 'qemu-devel' <qemu-devel@nongnu.org>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Save/load PC speaker internal state
Date: Mon, 27 Aug 2012 18:39:46 +0200 [thread overview]
Message-ID: <503BA2D2.8020602@suse.de> (raw)
In-Reply-To: <000001cd844e$7747c480$65d74d80$@Dovgaluk@ispras.ru>
Am 27.08.2012 14:21, schrieb Pavel Dovgaluk:
> 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<pavel.dovgaluk@gmail.com>
> ---
> hw/pcspk.c | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/hw/pcspk.c b/hw/pcspk.c
> index e430324..3fb3dd1 100644
> --- a/hw/pcspk.c
> +++ b/hw/pcspk.c
> @@ -159,10 +159,28 @@ static const MemoryRegionOps pcspk_io_ops = {
> },
> };
>
> +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),
> + VMSTATE_END_OF_LIST()
> + }
> +};
> +
> static int pcspk_initfn(ISADevice *dev)
> {
> PCSpkState *s = DO_UPCAST(PCSpkState, dev, dev);
>
> + vmstate_register(NULL, 0, &vmstate_spk, s);
> +
> memory_region_init_io(&s->ioport, &pcspk_io_ops, s, "elcr", 1);
> isa_register_ioport(dev, &s->ioport, s->iobase);
>
What about pc-1.0 etc. machines? Does this need to be backported to
stable branches first for migration from v1.2 to work? Or is such
incoming excess data silently ignored? Or any compat magic required on top?
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-08-27 16:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 12:21 [Qemu-devel] [PATCH] Save/load PC speaker internal state Pavel Dovgaluk
2012-08-27 16:39 ` Andreas Färber [this message]
2012-08-28 11:23 ` Juan Quintela
[not found] <503b6650.c88ddc0a.7e15.ffffb689SMTPIN_ADDED@mx.google.com>
2012-08-27 12:49 ` Peter Maydell
2012-08-28 7:01 ` Pavel Dovgaluk
[not found] <36635.9908286997$1346070105@news.gmane.org>
2012-08-27 17:27 ` Jan Kiszka
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=503BA2D2.8020602@suse.de \
--to=afaerber@suse.de \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=quintela@redhat.com \
/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).