[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/6] vmstate: Add support for alias ID
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 3/6] vmstate: Add support for alias ID |
Date: |
Thu, 13 May 2010 22:15:45 +0300 |
On 5/13/10, Jan Kiszka <address@hidden> wrote:
> From: Jan Kiszka <address@hidden>
>
> Some legacy users (mostly PC devices) of vmstate_register manage
> instance IDs on their own, and that unfortunately in a way that is
> incompatible with automatically generated ones. This so far prevents
> switching those users to vmstates that are registered by qdev.
>
> To establish a migration path, this patch introduces the concept of
> alias IDs. They can be passed to an extended vmstate registration
> service, and qdev provides a set service to be used during device init.
> find_se will consider the alias in addition to the default ID. We can
> then start generating the default ID automatically and writing it on
> vmsave, thus converting that format without breaking support for upward
> migration.
If this is only for compatibility, I think the name should show it,
like vmstate_set_compat_instance_id(), or
vmstate_set_legacy_instance_id(). That way, if there happens to be an
incompatible version bump, the function name suggests that it can be
removed.
The function should also take a last_legacy_version_id parameter.
Consider for example that a vmstate format with the legacy ID is
currently used with version_id of 2. We also start using this
compatibility system. A new, compatible version 3 arrives but we only
want to support legacy ID for version 2, as indicated by
last_legacy_version_id=2. Then with a new version, let's say 5, which
is no longer compatible with 2 or 3, the legacy ID stuff can finally
be thrown away. qdev.c should check if last_legacy_id >=
minimum_version_id and complain otherwise.
- [Qemu-devel] [PATCH 0/6] vmstate: Drop post_save / allow instance ID aliases, Jan Kiszka, 2010/05/12
- [Qemu-devel] Re: [PATCH 0/6] vmstate: Drop post_save / allow instance ID aliases, Juan Quintela, 2010/05/12
- [Qemu-devel] [PATCH 1/6] tmp105: Drop unused faults field, Jan Kiszka, 2010/05/12
- [Qemu-devel] [PATCH 6/6] mc146818rtc: Register vmstate via qdev, Jan Kiszka, 2010/05/12
- [Qemu-devel] [PATCH 4/6] serial: Register vmstate via qdev, Jan Kiszka, 2010/05/12
- [Qemu-devel] [PATCH 3/6] vmstate: Add support for alias ID, Jan Kiszka, 2010/05/12
- Re: [Qemu-devel] [PATCH 3/6] vmstate: Add support for alias ID,
Blue Swirl <=
- [Qemu-devel] [PATCH 5/6] fdc: Register vmstate via qdev, Jan Kiszka, 2010/05/12
- [Qemu-devel] [PATCH 2/6] vmstate: Drop unused post_save handler, Jan Kiszka, 2010/05/12