qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH v3 07/33] serial: register vmsd with DeviceClass


From: Marc-André Lureau
Subject: Re: [PATCH v3 07/33] serial: register vmsd with DeviceClass
Date: Tue, 19 Nov 2019 14:22:53 +0400

On Mon, Nov 18, 2019 at 6:22 PM Peter Maydell <address@hidden> wrote:
>
> On Wed, 23 Oct 2019 at 18:33, Marc-André Lureau
> <address@hidden> wrote:
> >
> > QOM-ify further.
> >
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> >  hw/char/serial.c | 13 ++++++++++---
> >  1 file changed, 10 insertions(+), 3 deletions(-)
> >
> > diff --git a/hw/char/serial.c b/hw/char/serial.c
> > index c839035fdd..4af8b0ce4c 100644
> > --- a/hw/char/serial.c
> > +++ b/hw/char/serial.c
> > @@ -990,8 +990,7 @@ SerialState *serial_init(int base, qemu_irq irq, int 
> > baudbase,
> >      s->baudbase = baudbase;
> >      qemu_chr_fe_init(&s->chr, chr, &error_abort);
> >      serial_realize_core(s, &error_fatal);
> > -
> > -    vmstate_register(NULL, base, &vmstate_serial, s);
> > +    qdev_set_legacy_instance_id(dev, base, 2);
> >      qdev_init_nofail(dev);
>
> Did you test whether migration still works from a QEMU
> version without this patch to one with it? (The migration

Yes, I thought I did test correctly, but I realized testing with x86
isn't correct.

So with arm/musicpal for ex, I can migrate from before->after, however
after->before won't work. Is that ok?

> vmstate code is too complicated for me to be able to figure
> out whether passing the 'dev' pointer makes a difference
> to whot it names the state sections and whether the
> 'qdev_set_legacy_instance_id' suffices to avoid problems.)

I don't see a way to fix after->before, because the instance id is
initially 0 with the new code, and the old code expect a different
value.




reply via email to

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