[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH v4 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR |
Date: |
Sun, 1 Dec 2019 21:27:21 +0400 |
Hi
On Sun, Dec 1, 2019 at 9:18 PM Peter Maydell <address@hidden> wrote:
>
> On Sun, 1 Dec 2019 at 10:19, Marc-André Lureau
> <address@hidden> wrote:
> >
> > - "serial: register vmsd with DeviceClass"
> >
> > This is standard qdev-ification, however it breaks backward migration,
> > but that's just how qdev_set_legacy_instance_id() works.
>
> I don't understand this part. Surely the whole point
> of setting a legacy instance ID is exactly to preserve
> migration compatibility? If it doesn't do that then what
> does setting legacy ID value do?
>
It works in old->new direction only, because new code can match the
legacy instance id.
But when going from new->old, the legacy instance id is lost, as it
uses new 0-based instance_id.
This is just the way we have done so far, but I wish to be corrected
if I am wrong.
See the commit description for a bit more details.
--
Marc-André Lureau
Re: [PATCH v4 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR, Marc-André Lureau, 2019/12/11