qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] usb-ccid: remove needless migration state code


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH] usb-ccid: remove needless migration state code
Date: Thu, 12 Oct 2017 16:02:10 +0200

Hi

On Thu, Oct 12, 2017 at 3:29 PM, Gerd Hoffmann <address@hidden> wrote:
> On Thu, 2017-10-12 at 13:21 +0200, Marc-André Lureau wrote:
>> This code appears to be unused since its introduction. It should be
>> safe to remove from VMState.
>
> Well, almost:
>
>> @@ -1452,7 +1431,6 @@ static VMStateDescription ccid_vmstate = {
>>          VMSTATE_STRUCT_ARRAY(pending_answers, USBCCIDState,
>>                          PENDING_ANSWERS_NUM, 1, answer_vmstate,
>> Answer),
>>          VMSTATE_UINT32(pending_answers_num, USBCCIDState),
>> -        VMSTATE_UINT8(migration_state, USBCCIDState),
>>          VMSTATE_UINT32(state_vmstate, USBCCIDState),
>>          VMSTATE_END_OF_LIST()
>>      }
>
> We have to keep this (or some placeholder) so the vmstate format
> doesn't change.

I did a simple migration test from a state file with the field to a
state file without, and the other way around and it seemed to work. I
probably screwed up the test.

Looking at vmstate code, it obviously changes the wire format. So
let's keep the field. (I was wondering how/if the vmdesc was able to
match field names/version, probably not)

I was looking for some documentation regarding VMState versionning, it
doesn't seem to be documented when you need to bump version, and how
to do it (struct vs version fields, compatibility with older version
etc).

I'll send v2
thanks


-- 
Marc-André Lureau



reply via email to

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