All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] ide: fix migration in the middle of a	bmdma transfer
Date: Tue, 15 Jun 2010 16:59:44 +0300	[thread overview]
Message-ID: <4C178750.2080109@redhat.com> (raw)
In-Reply-To: <31e7e4aefc644057186f501bfef4584d337a4d9c.1276607973.git.quintela@redhat.com>

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.

> +    .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.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2010-06-15 14:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 13:31 [Qemu-devel] [PATCH 0/5] Migration subsections (and ide as example) Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 1/5] Revert "ide save/restore pio/atapi cmd transfer fields and io buffer" Juan Quintela
2010-06-15 13:51   ` Avi Kivity
2010-06-15 13:31 ` [Qemu-devel] [PATCH 2/5] Revert "ide save/restore current transfer fields" Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 3/5] vmstate: add subsections code Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 4/5] ide: fix migration in the middle of pio operation Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 5/5] ide: fix migration in the middle of a bmdma transfer Juan Quintela
2010-06-15 13:59   ` Avi Kivity [this message]
2010-06-15 14:05     ` [Qemu-devel] " Juan Quintela
2010-06-16  8:54   ` Paolo Bonzini
2010-06-16 13:02     ` Juan Quintela
2010-06-15 14:09 ` [Qemu-devel] [PATCH 0/5] Migration subsections (and ide as example) Anthony Liguori
2010-06-15 14:19   ` [Qemu-devel] " Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C178750.2080109@redhat.com \
    --to=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.