[Top][All Lists]
[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.
- [Qemu-devel] [PATCH 0/5] Migration subsections (and ide as example), Juan Quintela, 2010/06/15
- [Qemu-devel] [PATCH 4/5] ide: fix migration in the middle of pio operation, Juan Quintela, 2010/06/15
- [Qemu-devel] [PATCH 2/5] Revert "ide save/restore current transfer fields", Juan Quintela, 2010/06/15
- [Qemu-devel] [PATCH 3/5] vmstate: add subsections code, Juan Quintela, 2010/06/15
- [Qemu-devel] [PATCH 1/5] Revert "ide save/restore pio/atapi cmd transfer fields and io buffer", Juan Quintela, 2010/06/15
- [Qemu-devel] [PATCH 5/5] ide: fix migration in the middle of a bmdma transfer, Juan Quintela, 2010/06/15
- Re: [Qemu-devel] [PATCH 0/5] Migration subsections (and ide as example), Anthony Liguori, 2010/06/15