From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Andrew Jones <drjones@redhat.com>,
marcin.krzeminski@nokia.com,
QEMU Developers <qemu-devel@nongnu.org>,
alistair.francis@xilinx.com, qemu-arm <qemu-arm@nongnu.org>,
Amit Shah <amit.shah@redhat.com>
Subject: Re: [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results
Date: Thu, 18 Aug 2016 20:04:22 +0100 [thread overview]
Message-ID: <20160818190421.GE2009@work-vm> (raw)
In-Reply-To: <CAFEAcA9oAi5++H0eYiE-SyHMtLFmD5haw+d0DsN+MLo29f9U_A@mail.gmail.com>
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 18 August 2016 at 15:00, Andrew Jones <drjones@redhat.com> wrote:
> > We've recently started versioning mach-virt, v2.6 was the first versioned
> > release. As an effort to try and make sure we're doing things right, I
> > tried the vmstate-static-checker.py script. I compared a 2.6 machine
> > from a QEMU built from the v2.6.0 tag with a 2.6 machine from a QEMU
> > built from today's latest pull (5844365fe8). I see lots of errors. I have
> > no experience in this area, so I can't even state whether they're truly
> > a concern or not. I can say a few things;
> >
> > 1) Most of the errors look like the same problem. Something is wrong
> > with xilinx_spi state, which shows up everywhere. Here's an example
> >
> > Section "en25q64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
>
> Well, something here is weird, because en25q64 and nonvolatile_cfg
> aren't part of xilinx_spi at all, they're in hw/block/m25p80.c.
Hmm, except there are two separate things with the name "xilinx_spi";
vmstate_xilinx_spi in hw/ssi/xilinx_spi.c
which is the state for the "xlnx.xps-spi" (aka TYPE_XILINX_SPI) object.
and for added confusion:
vmstate_m25p80 in hw/block/m25p80.c
which is the state for the "m25p80-generic" (aka TYPE_M25P80) object.
also calls itself "xilinx_spi".
These went in a pair of Peter Crosthwaite commits at about the same time 4.5 years
ago; I'm guessing it was just a copy-paste.
I think my preference would be to update the name for the m25p80 so it's
not got the clash; but it seems m25p80 contains definitions of about a zillion
flash devices all derived from the m25p80, so I think I'd have to try one of
them to see if the xilinx_spi name finds it's way onto the migration stream;
I suspect it doesn't.
Dave
> However we don't care about migration compatibility in the Xilinx
> boards at all, so the simple fix is just not to try to test them.
> Similarly, aspeed and imx are boards where we're not trying to
> preserve migration compat.
>
> > 2) Several of the remaining problems are also present on a check of the
> > x86_64 pc-i440fx-2.6 machine type. To be precise
> >
> > Section "am53c974", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> > Section "dc390", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> > Section "e1000-82544gc", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
> > Section "e1000-82545em", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
> > Section "e1000", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
> > Section "esp", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> > Section "rtl8139", Description "rtl8139": expected field "tally_counters", got "tally_counters.TxOk"; skipping rest
>
> Looking at just the e1000 for an example, this is a false positive
> in your checker. In commit 093454e2 the struct we're putting the
> ipcss/ipcso/etc fields was moved, so:
>
> - VMSTATE_UINT8(tx.ipcss, E1000State),
> - VMSTATE_UINT8(tx.ipcso, E1000State),
> - VMSTATE_UINT16(tx.ipcse, E1000State),
> - VMSTATE_UINT8(tx.tucss, E1000State),
> - VMSTATE_UINT8(tx.tucso, E1000State),
> - VMSTATE_UINT16(tx.tucse, E1000State),
> - VMSTATE_UINT32(tx.paylen, E1000State),
> - VMSTATE_UINT8(tx.hdr_len, E1000State),
> - VMSTATE_UINT16(tx.mss, E1000State),
> + VMSTATE_UINT8(tx.props.ipcss, E1000State),
> + VMSTATE_UINT8(tx.props.ipcso, E1000State),
> + VMSTATE_UINT16(tx.props.ipcse, E1000State),
> + VMSTATE_UINT8(tx.props.tucss, E1000State),
> + VMSTATE_UINT8(tx.props.tucso, E1000State),
> + VMSTATE_UINT16(tx.props.tucse, E1000State),
> + VMSTATE_UINT32(tx.props.paylen, E1000State),
> + VMSTATE_UINT8(tx.props.hdr_len, E1000State),
> + VMSTATE_UINT16(tx.props.mss, E1000State),
>
> but the on-the-wire format doesn't include the names of the C struct
> fields so this isn't a migration break.
>
> > x86 only has three additional messages, which look harmless to me
> >
> > Section "apic-common" does not exist in dest
> > Section "apic" does not exist in dest
> > Section "kvm-apic" does not exist in dest
> >
> > 3) I analyzed one error I saw, and see it should be fine, as the device
> > simply went from unmigratable to migratable (for TCG anyway)
> >
> > Section "arm-gicv3-common" Section "arm-gicv3-common" Description "arm_gicv3": minimum version error: 0 < 1
>
> Yep, that should be fine.
>
> thanks
> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Andrew Jones <drjones@redhat.com>,
marcin.krzeminski@nokia.com, alistair.francis@xilinx.com,
crosthwaite.peter@gmail.com,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>, Amit Shah <amit.shah@redhat.com>
Subject: Re: [Qemu-devel] hw/arm/virt: vmstate-static-checker.py results
Date: Thu, 18 Aug 2016 20:04:22 +0100 [thread overview]
Message-ID: <20160818190421.GE2009@work-vm> (raw)
In-Reply-To: <CAFEAcA9oAi5++H0eYiE-SyHMtLFmD5haw+d0DsN+MLo29f9U_A@mail.gmail.com>
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 18 August 2016 at 15:00, Andrew Jones <drjones@redhat.com> wrote:
> > We've recently started versioning mach-virt, v2.6 was the first versioned
> > release. As an effort to try and make sure we're doing things right, I
> > tried the vmstate-static-checker.py script. I compared a 2.6 machine
> > from a QEMU built from the v2.6.0 tag with a 2.6 machine from a QEMU
> > built from today's latest pull (5844365fe8). I see lots of errors. I have
> > no experience in this area, so I can't even state whether they're truly
> > a concern or not. I can say a few things;
> >
> > 1) Most of the errors look like the same problem. Something is wrong
> > with xilinx_spi state, which shows up everywhere. Here's an example
> >
> > Section "en25q64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
>
> Well, something here is weird, because en25q64 and nonvolatile_cfg
> aren't part of xilinx_spi at all, they're in hw/block/m25p80.c.
Hmm, except there are two separate things with the name "xilinx_spi";
vmstate_xilinx_spi in hw/ssi/xilinx_spi.c
which is the state for the "xlnx.xps-spi" (aka TYPE_XILINX_SPI) object.
and for added confusion:
vmstate_m25p80 in hw/block/m25p80.c
which is the state for the "m25p80-generic" (aka TYPE_M25P80) object.
also calls itself "xilinx_spi".
These went in a pair of Peter Crosthwaite commits at about the same time 4.5 years
ago; I'm guessing it was just a copy-paste.
I think my preference would be to update the name for the m25p80 so it's
not got the clash; but it seems m25p80 contains definitions of about a zillion
flash devices all derived from the m25p80, so I think I'd have to try one of
them to see if the xilinx_spi name finds it's way onto the migration stream;
I suspect it doesn't.
Dave
> However we don't care about migration compatibility in the Xilinx
> boards at all, so the simple fix is just not to try to test them.
> Similarly, aspeed and imx are boards where we're not trying to
> preserve migration compat.
>
> > 2) Several of the remaining problems are also present on a check of the
> > x86_64 pc-i440fx-2.6 machine type. To be precise
> >
> > Section "am53c974", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> > Section "dc390", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> > Section "e1000-82544gc", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
> > Section "e1000-82545em", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
> > Section "e1000", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
> > Section "esp", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> > Section "rtl8139", Description "rtl8139": expected field "tally_counters", got "tally_counters.TxOk"; skipping rest
>
> Looking at just the e1000 for an example, this is a false positive
> in your checker. In commit 093454e2 the struct we're putting the
> ipcss/ipcso/etc fields was moved, so:
>
> - VMSTATE_UINT8(tx.ipcss, E1000State),
> - VMSTATE_UINT8(tx.ipcso, E1000State),
> - VMSTATE_UINT16(tx.ipcse, E1000State),
> - VMSTATE_UINT8(tx.tucss, E1000State),
> - VMSTATE_UINT8(tx.tucso, E1000State),
> - VMSTATE_UINT16(tx.tucse, E1000State),
> - VMSTATE_UINT32(tx.paylen, E1000State),
> - VMSTATE_UINT8(tx.hdr_len, E1000State),
> - VMSTATE_UINT16(tx.mss, E1000State),
> + VMSTATE_UINT8(tx.props.ipcss, E1000State),
> + VMSTATE_UINT8(tx.props.ipcso, E1000State),
> + VMSTATE_UINT16(tx.props.ipcse, E1000State),
> + VMSTATE_UINT8(tx.props.tucss, E1000State),
> + VMSTATE_UINT8(tx.props.tucso, E1000State),
> + VMSTATE_UINT16(tx.props.tucse, E1000State),
> + VMSTATE_UINT32(tx.props.paylen, E1000State),
> + VMSTATE_UINT8(tx.props.hdr_len, E1000State),
> + VMSTATE_UINT16(tx.props.mss, E1000State),
>
> but the on-the-wire format doesn't include the names of the C struct
> fields so this isn't a migration break.
>
> > x86 only has three additional messages, which look harmless to me
> >
> > Section "apic-common" does not exist in dest
> > Section "apic" does not exist in dest
> > Section "kvm-apic" does not exist in dest
> >
> > 3) I analyzed one error I saw, and see it should be fine, as the device
> > simply went from unmigratable to migratable (for TCG anyway)
> >
> > Section "arm-gicv3-common" Section "arm-gicv3-common" Description "arm_gicv3": minimum version error: 0 < 1
>
> Yep, that should be fine.
>
> thanks
> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2016-08-18 19:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 14:00 [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results Andrew Jones
2016-08-18 14:00 ` [Qemu-devel] " Andrew Jones
2016-08-18 14:06 ` [Qemu-arm] " Andrew Jones
2016-08-18 14:06 ` Andrew Jones
2016-08-18 14:26 ` Peter Maydell
2016-08-18 14:26 ` Peter Maydell
2016-08-18 19:04 ` Dr. David Alan Gilbert [this message]
2016-08-18 19:04 ` Dr. David Alan Gilbert
2016-08-18 19:05 ` [Qemu-arm] " Peter Maydell
2016-08-18 19:05 ` [Qemu-devel] " Peter Maydell
2016-08-18 19:19 ` [Qemu-arm] " mar.krzeminski
2016-08-18 19:19 ` mar.krzeminski
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=20160818190421.GE2009@work-vm \
--to=dgilbert@redhat.com \
--cc=alistair.francis@xilinx.com \
--cc=amit.shah@redhat.com \
--cc=drjones@redhat.com \
--cc=marcin.krzeminski@nokia.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.