qemu-arm.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results
@ 2016-08-18 14:00 Andrew Jones
  2016-08-18 14:06 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
  2016-08-18 14:26 ` Peter Maydell
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Jones @ 2016-08-18 14:00 UTC (permalink / raw)
  To: qemu-devel, qemu-arm; +Cc: Amit Shah, peter.maydell, David Gilbert

Hi all,

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

 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

    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


Any help with this would be appreciated. I probably won't be looking into
it myself, at least not any time soon. So, IOW, this mail is really just a
bug report, not a progress report :-)

Steps I did and full output attached.

Thanks,
drew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-arm] [Qemu-devel] hw/arm/virt: vmstate-static-checker.py results
  2016-08-18 14:00 [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results Andrew Jones
@ 2016-08-18 14:06 ` Andrew Jones
  2016-08-18 14:26 ` Peter Maydell
  1 sibling, 0 replies; 6+ messages in thread
From: Andrew Jones @ 2016-08-18 14:06 UTC (permalink / raw)
  To: qemu-devel, qemu-arm; +Cc: Amit Shah, peter.maydell, David Gilbert

[-- Attachment #1: Type: text/plain, Size: 2453 bytes --]

On Thu, Aug 18, 2016 at 04:00:14PM +0200, Andrew Jones wrote:
> Hi all,
> 
> 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
> 
>  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
> 
>     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
> 
> 
> Any help with this would be appreciated. I probably won't be looking into
> it myself, at least not any time soon. So, IOW, this mail is really just a
> bug report, not a progress report :-)
> 
> Steps I did and full output attached.

Sigh... forgot to actually attach. Am now.

> 
> Thanks,
> drew
> 

[-- Attachment #2: vmstate-checker.results --]
[-- Type: text/plain, Size: 15878 bytes --]


# Run with build of v2.6.0 tag
x86_64-softmmu/qemu-system-x86_64 -M pc-i440fx-2.6 -dump-vmstate x86_64.v2.6
aarch64-softmmu/qemu-system-aarch64 -M virt-2.6 -dump-vmstate aarch64.v2.6

# Run with latest QEMU build
x86_64-softmmu/qemu-system-x86_64 -M pc-i440fx-2.6 -dump-vmstate x86_64.latest
aarch64-softmmu/qemu-system-aarch64 -M virt-2.6 -dump-vmstate aarch64.latest

# x86_64 pc static checker output
../qemu/scripts/vmstate-static-checker.py -s x86_64.v2.6 -d x86_64.latest
Section "e1000-82544gc", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
Section "rtl8139", Description "rtl8139": expected field "tally_counters", got "tally_counters.TxOk"; skipping rest
Section "esp", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "dc390", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "e1000-82545em", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
Section "apic-common" does not exist in dest
Section "apic" does not exist in dest
Section "am53c974", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "kvm-apic" does not exist in dest
Section "e1000", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest

# AArch64 mach-virt static checker output
# Note1: The 'grep -v' is used to avoid over 100 lines like
#  Section "<DEVICE>", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
# which all seem to be the same issue. Unfiltered output below.
# Note2: I think the arm-gicv3-common error should be fine, as that
# device simply went from unmigratable to migratable (for TCG).
../qemu/scripts/vmstate-static-checker.py -s aarch64.v2.6 -d aarch64.latest | grep -v xilinx_spi
Section "e1000-82544gc", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
Section "aspeed.timer" Description "aspeed.timer": minimum version error: 1 < 2
Section "aspeed.timer" Description "aspeed.timer": version error: 1 > 0
Section "aspeed.timer", Description "aspeed.timer", Field "timer": missing description
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
Section "dc390", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "imx.fec" Section "imx.fec" Description "imx.fec": minimum version error: 1 < 2
Section "imx.fec", Description "imx.fec": expected field "irq_state", got "regs"; skipping rest
Section "e1000-82545em", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
Section "arm-gicv3-common" Section "arm-gicv3-common" Description "arm_gicv3": minimum version error: 0 < 1
Section "am53c974", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "imx.gpt" does not exist in dest
Section "e1000", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest

# AArch64 mach-virt, the unfiltered check
../qemu/scripts/vmstate-static-checker.py -s aarch64.v2.6 -d aarch64.latest
Section "en25q64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m45pe16", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25q64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25pe20", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25fl016k", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25q32dw", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "e1000-82544gc", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
Section "gd25q32", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25x80", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p20", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p80", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q256a13", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q256a11", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25px32-s0", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at25df321a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25wf020", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "aspeed.timer" Description "aspeed.timer": minimum version error: 1 < 2
Section "aspeed.timer" Description "aspeed.timer": version error: 1 > 0
Section "aspeed.timer", Description "aspeed.timer", Field "timer": missing description
Section "en25f32", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "640s33b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p05", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l25635e", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25x16", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "esp", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "w25x10", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "rtl8139", Description "rtl8139": expected field "tally_counters", got "tally_counters.TxOk"; skipping rest
Section "en25p64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25q256", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25fl512s", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25sl004a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25x20", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l4005a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q032", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25sl032a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25vf016b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25vf080b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25sl032p", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l12855e", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at25df641", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25q32", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m45pe80", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25x32", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "dc390", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "at25df041a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p16", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p10", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l3205d", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "en25p32", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25wf080", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at26df081a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at25fs040", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25wf512", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m45pe10", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l8005", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25wf010", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25x40", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p32", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25vf032b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "imx.fec" Section "imx.fec" Description "imx.fec": minimum version error: 1 < 2
Section "imx.fec", Description "imx.fec": expected field "irq_state", got "regs"; skipping rest
Section "mx25l6405d", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "e1000-82545em", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
Section "n25q032a13", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q032a11", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l25655e", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25fl256s0", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25fl256s1", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s70fl01gs", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p128", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25fl064k", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "gd25q64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q064", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25vf040b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25q80", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q512a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25px64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l2005a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25pe80", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at25256a-nonjedec", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at25128a-nonjedec", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25px32-s1", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25x64", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25sl016a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25pe16", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "160s33b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25p40", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "arm-gicv3-common" Section "arm-gicv3-common" Description "arm_gicv3": minimum version error: 0 < 1
Section "am53c974", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
Section "n25q128", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at25fs010", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at26df321", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q064a13", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "imx.gpt" does not exist in dest
Section "s25sl12800", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25sl12801", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "sst25wf040", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25sl008a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l1606e", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at26df161a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "mx25l12805d", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q256a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "320s33b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at45db081d", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "at26f004", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q064a11", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "e1000", Description "e1000": expected field "tx.ipcss", got "tx.props.ipcss"; skipping rest
Section "s25sl064a", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q128a13", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "n25q128a11", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "w25q80bl", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25sl064p", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25fl129p0", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "s25fl129p1", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "m25px32", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest
Section "en25q32b", Description "xilinx_spi": expected field "nonvolatile_cfg", got "cur_addr"; skipping rest


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] hw/arm/virt: vmstate-static-checker.py results
  2016-08-18 14:00 [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results Andrew Jones
  2016-08-18 14:06 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
@ 2016-08-18 14:26 ` Peter Maydell
  2016-08-18 19:04   ` [Qemu-arm] " Dr. David Alan Gilbert
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2016-08-18 14:26 UTC (permalink / raw)
  To: Andrew Jones; +Cc: Amit Shah, qemu-arm, QEMU Developers, David Gilbert

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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results
  2016-08-18 14:26 ` Peter Maydell
@ 2016-08-18 19:04   ` Dr. David Alan Gilbert
  2016-08-18 19:05     ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2016-08-18 19:04 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Andrew Jones, marcin.krzeminski, QEMU Developers,
	alistair.francis, qemu-arm, Amit Shah

* 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results
  2016-08-18 19:04   ` [Qemu-arm] " Dr. David Alan Gilbert
@ 2016-08-18 19:05     ` Peter Maydell
  2016-08-18 19:19       ` [Qemu-arm] [Qemu-devel] " mar.krzeminski
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2016-08-18 19:05 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: Andrew Jones, Krzeminski, Marcin (Nokia - PL/Wroclaw),
	QEMU Developers, Alistair Francis, qemu-arm, Amit Shah

On 18 August 2016 at 20:04, Dr. David Alan Gilbert <dgilbert@redhat.com> wrote:
> 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.

Aha. Yeah, we should fix that. (I have a feeling the m25p80 devices are
all only for boards where we don't care about migration-compat, but I'm
not completely certain.)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-arm] [Qemu-devel] hw/arm/virt: vmstate-static-checker.py results
  2016-08-18 19:05     ` Peter Maydell
@ 2016-08-18 19:19       ` mar.krzeminski
  0 siblings, 0 replies; 6+ messages in thread
From: mar.krzeminski @ 2016-08-18 19:19 UTC (permalink / raw)
  To: Peter Maydell, Dr. David Alan Gilbert
  Cc: Andrew Jones, Krzeminski, Marcin (Nokia - PL/Wroclaw),
	QEMU Developers, Alistair Francis, qemu-arm, Amit Shah

W dniu 18.08.2016 o 21:05, Peter Maydell pisze:

> On 18 August 2016 at 20:04, Dr. David Alan Gilbert <dgilbert@redhat.com> wrote:
>> 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.
> Aha. Yeah, we should fix that. (I have a feeling the m25p80 devices are
> all only for boards where we don't care about migration-compat, but I'm
> not completely certain.)
I had a patch to change vmstate name in m25p80,
but I do not know why I have not send it.
I also believe that there is no board that could use migration of m25p80
devs (yet?).

Regards,
Marcin

>
> thanks
> -- PMM
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-18 19:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 14:00 [Qemu-arm] hw/arm/virt: vmstate-static-checker.py results Andrew Jones
2016-08-18 14:06 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
2016-08-18 14:26 ` Peter Maydell
2016-08-18 19:04   ` [Qemu-arm] " Dr. David Alan Gilbert
2016-08-18 19:05     ` Peter Maydell
2016-08-18 19:19       ` [Qemu-arm] [Qemu-devel] " mar.krzeminski

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).