qemu-devel
[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: Peter Maydell
Subject: Re: [PATCH v3 07/33] serial: register vmsd with DeviceClass
Date: Mon, 18 Nov 2019 14:21:48 +0000

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

thanks
-- PMM



reply via email to

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