Re: [PATCH 1/1] hw/char: imx_serial: add missing migration state

Peter Maydell <[email protected]>
Newsgroups org.nongnu.qemu-arm,org.nongnu.qemu-devel
Message-ID <CAFEAcA-k5U_AnQXTOEeshYSpZcQyOMrFEJgnqOqpO4EMQBGNZg@mail.gmail.com>
On Tue, 21 Jul 2026 at 20:01, Michael Tokarev <[email protected]> wrote:
>
> On 7/15/26 16:18, Tao Ding wrote:
> > Add ucr2 from imx_serial to vmstate, and increment the version_id.
> >
> > Migrating on sabrelite can reproduce this issue:
> > 1. Prepare the U-Boot required for sabrelite. (according to sabrelite.rst)
> > 2. Compile qemu
> >      $ mkdir build && cd build && ../configure --target-list="arm-softmmu" && make -j4
> > 3. Start sabrelite and prepare for migration
> >      $ ./build/qemu-system-arm -M sabrelite \
> >      -smp 1 -m 1G -display none -serial null -serial mon:stdio \
> >      -kernel ~/u-boot
> > 4. Enter qemu monitor after uboot. (ctrl + a + c)
> >      (qemu) stop
> >      (qemu) xp /4wx 0x021e8084
> >      021e8084: 0x00004027 0x00000784 0x00008000 0x00000a01
> >      (qemu) migrate -d file:vmstate
> >      (qemu) q
> >
> > Load the migrated vmstate, before repairing:
> >
> > $ ./build/qemu-system-arm -M sabrelite \
> >      -smp 1 -m 1G -display none -serial null -serial mon:stdio \
> >      -kernel ~/u-boot -incoming file:vmstate
> >
> > (ctrl + a + c)
> >      QEMU 11.0.50 monitor - type 'help' for more information
> >      (qemu) xp /4wx 0x021e8084
> >      021e8084: 0x00000004 0x00000784 0x00008000 0x00000a01
> >      (qemu) q
> >
> > It can be found that the data for address 0x021e8084 (register of usr2 in imx_serial of sabrelite)
> > is not the data before the migration.
> >
> > After being repaired:
> > $ ./build/qemu-system-arm -M sabrelite \
> >      -smp 1 -m 1G -display none -serial null -serial mon:stdio \
> >      -kernel ~/u-boot -incoming file:vmstate
> > (ctrl + a + c)
> >      QEMU 11.0.50 monitor - type 'help' for more information
> >      (qemu) xp /4wx 0x021e8084
> >      021e8084: 0x00004027 0x00000784 0x00008000 0x00000a01
> >
> > Signed-off-by: Tao Ding <[email protected]>
>
>
> Somehow, this grow Cc: qemu-stable@ in the final version which was
> applied as v11.1.0-rc0-68-g8833ff95eaf.  I don't think this is a
> good candidate for the stable series, since this fix changes the
> migration stream format, which is very difficult to do in the stable
> series.

On the other hand it goes from "migration doesn't work" to
"migration works" for a typical guest :-)  But I agree it's
probably better to avoid migration breaks in stable branches
unless they're fixing something really critical.

-- PMM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.