qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 5/5] ide: fix migration in the middle of a bmdma


From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH 5/5] ide: fix migration in the middle of a bmdma transfer
Date: Tue, 15 Jun 2010 16:05:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Avi Kivity <address@hidden> wrote:
> On 06/15/2010 04:31 PM, Juan Quintela wrote:
>> +static bool ide_bmdma_current_needed(void *opaque)
>> +{
>> +    BMDMAState *bm = opaque;
>> +
>> +    return (bm->cur_prd_len != 0);
>> +}
>> +
>> +static const VMStateDescription vmstate_bmdma_current = {
>> +    .name = "ide bmdma_current",
>> +    .version_id = 1,
>> +    .minimum_version_id = 1,
>> +    .minimum_version_id_old = 1,
>>    
>
> Can we allow these to default to 0?  Most subsections (and most new
> sections) won't need version numbers.

It is not clear for all if default value is 0 or 1. (not consistent).
We can put it as 0.

>> +    .fields      = (VMStateField []) {
>> +        VMSTATE_UINT32(cur_addr, BMDMAState),
>> +        VMSTATE_UINT32(cur_prd_last, BMDMAState),
>> +        VMSTATE_UINT32(cur_prd_addr, BMDMAState),
>> +        VMSTATE_UINT32(cur_prd_len, BMDMAState),
>> +        VMSTATE_END_OF_LIST()
>> +    }
>> +};
>> +
>> +
>>   static const VMStateDescription vmstate_bmdma = {
>>       .name = "ide bmdma",
>>       .version_id = 3,
>> @@ -134,6 +156,14 @@ static const VMStateDescription vmstate_bmdma = {
>>           VMSTATE_UINT32(nsector, BMDMAState),
>>           VMSTATE_UINT8(unit, BMDMAState),
>>           VMSTATE_END_OF_LIST()
>> +    },
>> +    .subsections = (VMStateSubsection []) {
>> +        {
>> +            .vmsd =&vmstate_bmdma_current,
>> +            .needed = ide_bmdma_current_needed,
>> +        }, {
>> +            /* empty */
>> +        }
>>       }
>>   };
>>    
>
> Looks concise and simple.



reply via email to

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