qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-arm] [PATCH] block: m25p80c Fix vmstate structure


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH] block: m25p80c Fix vmstate structure name
Date: Fri, 19 Aug 2016 15:19:30 +0100
User-agent: Mutt/1.6.2 (2016-07-01)

* Peter Maydell (address@hidden) wrote:
> On 19 August 2016 at 13:30,  <address@hidden> wrote:
> > From: Marcin Krzeminski <address@hidden>
> >
> > Change wrong name of the vmstate structure. Since this breaks
> > compatibility update version and fields to 0.
> >
> > Signed-off-by: Marcin Krzeminski <address@hidden>
> > ---
> >
> > This patch assumes that none migrates m25p80 flash devices.
> >
> >  hw/block/m25p80.c | 29 ++++++++++++++---------------
> >  1 file changed, 14 insertions(+), 15 deletions(-)
> >
> > diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
> > index 9828ee6..d29ff4c 100644
> > --- a/hw/block/m25p80.c
> > +++ b/hw/block/m25p80.c
> > @@ -1189,9 +1189,9 @@ static Property m25p80_properties[] = {
> >  };
> >
> >  static const VMStateDescription vmstate_m25p80 = {
> > -    .name = "xilinx_spi",
> > -    .version_id = 3,
> > -    .minimum_version_id = 1,
> > +    .name = "m25p80",
> > +    .version_id = 0,
> > +    .minimum_version_id = 0,
> >      .pre_save = m25p80_pre_save,
> 
> Are you sure that the name is part of the on-the-wire state?
> I thought it wasn't, in which case this doesn't even need a
> version bump, much less a version-reset-to-zero. But I could
> be wrong. David, Juan, Amit?
> 

Yep, it does:

000a9000: 00 1c 04 00 00 00 1d 0a 78 69 6c 69 6e 78 5f 73  ........xilinx_s
000a9010: 70 69 00 00 00 00 00 00 00 03 00 00 00 00 00 00  pi..............

that's from:
./arm-softmmu/qemu-system-arm -M tosa -device at26f004 -S -nographic
QEMU 2.6.90 monitor - type 'help' for more information
(qemu) migrate "exec:xxd -g 1 > tosa.mig"

it's not essential to redo the version_id's, but it's as good a time as any
to get rid of the old version code if you've just broken the compatibility
anyway.

Dave

> thanks
> -- PMM
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]