From: David Gibson <david@gibson.dropbear.id.au>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, benh@kernel.crashing.org
Subject: Re: [Qemu-devel] [PATCH 7/8] openpic: add missing timer fields to vmstate_openpic_timer
Date: Tue, 19 Sep 2017 08:44:23 +1000 [thread overview]
Message-ID: <20170918224423.GF27153@umbus> (raw)
In-Reply-To: <1505668548-16616-8-git-send-email-mark.cave-ayland@ilande.co.uk>
[-- Attachment #1: Type: text/plain, Size: 2445 bytes --]
On Sun, Sep 17, 2017 at 06:15:47PM +0100, Mark Cave-Ayland wrote:
> Observation of the code shows indicates that several timer fields are
> missing from the migration stream.
So, adding new things to the migration stream always requires some
thought. The commit message should contain a rationale for why the
proposed representation is a good one. In particular is it one that's
unlikely to be difficult if the device changes internal details in
future. When possible it's best to stick to architected documented
state of the modelled hardware, though I can see you're probably going
to need some extras in this case.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/intc/openpic.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
> index 10d6e87..debfcbf 100644
> --- a/hw/intc/openpic.c
> +++ b/hw/intc/openpic.c
> @@ -1570,11 +1570,14 @@ static const VMStateDescription vmstate_openpic_irqsource = {
>
> static const VMStateDescription vmstate_openpic_timer = {
> .name = "openpic_timer",
> - .version_id = 0,
> - .minimum_version_id = 0,
> + .version_id = 1,
> + .minimum_version_id = 1,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32(tccr, OpenPICTimer),
> VMSTATE_UINT32(tbcr, OpenPICTimer),
> + VMSTATE_BOOL(qemu_timer_active, OpenPICTimer),
> + VMSTATE_TIMER_PTR(qemu_timer, OpenPICTimer),
> + VMSTATE_UINT64(origin_time, OpenPICTimer),
> VMSTATE_END_OF_LIST()
> }
> };
> @@ -1620,7 +1623,7 @@ static const VMStateDescription vmstate_openpic = {
> VMSTATE_UINT32_EQUAL(nb_cpus, OpenPICState, NULL),
> VMSTATE_STRUCT_VARRAY_UINT32(dst, OpenPICState, nb_cpus, 0,
> vmstate_openpic_irqdest, IRQDest),
> - VMSTATE_STRUCT_ARRAY(timers, OpenPICState, OPENPIC_MAX_TMR, 0,
> + VMSTATE_STRUCT_ARRAY(timers, OpenPICState, OPENPIC_MAX_TMR, 1,
> vmstate_openpic_timer, OpenPICTimer),
> VMSTATE_STRUCT_ARRAY(msi, OpenPICState, MAX_MSI, 0,
> vmstate_openpic_msi, OpenPICMSI),
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-09-19 10:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 17:15 [Qemu-devel] [PATCH 0/8] ppc: more Mac-related fixups Mark Cave-Ayland
2017-09-17 17:15 ` [Qemu-devel] [PATCH 1/8] ppc: QOMify g3beige machine Mark Cave-Ayland
2017-09-18 3:42 ` Philippe Mathieu-Daudé
2017-09-18 20:25 ` David Gibson
2017-09-17 17:15 ` [Qemu-devel] [PATCH 2/8] ppc/mac: Advertise a high clock frequency for NewWorld Macs Mark Cave-Ayland
2017-09-18 20:25 ` David Gibson
2017-09-17 17:15 ` [Qemu-devel] [PATCH 3/8] ppc/ide/macio: Add missing registers Mark Cave-Ayland
2017-09-18 20:27 ` David Gibson
2017-09-17 17:15 ` [Qemu-devel] [PATCH 4/8] macio: convert pmac_ide_ops from old_mmio Mark Cave-Ayland
2017-09-18 20:36 ` David Gibson
2017-09-19 19:31 ` Mark Cave-Ayland
2017-09-17 17:15 ` [Qemu-devel] [PATCH 5/8] ppc/mac: More rework of the DBDMA emulation Mark Cave-Ayland
2017-09-18 20:37 ` David Gibson
2017-09-17 17:15 ` [Qemu-devel] [PATCH 6/8] ppc: Fix OpenPIC model Mark Cave-Ayland
2017-09-18 20:37 ` David Gibson
2017-09-17 17:15 ` [Qemu-devel] [PATCH 7/8] openpic: add missing timer fields to vmstate_openpic_timer Mark Cave-Ayland
2017-09-18 22:44 ` David Gibson [this message]
2017-09-19 19:50 ` Mark Cave-Ayland
2017-09-20 12:04 ` David Gibson
2017-09-17 17:15 ` [Qemu-devel] [PATCH 8/8] openpic: Fix problem when IRQ transitions from edge to level Mark Cave-Ayland
2017-09-18 20:39 ` David Gibson
2017-09-19 19:52 ` Mark Cave-Ayland
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=20170918224423.GF27153@umbus \
--to=david@gibson.dropbear.id.au \
--cc=benh@kernel.crashing.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).