From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42518 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOWgW-0006f2-Da for qemu-devel@nongnu.org; Tue, 15 Jun 2010 10:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOWg9-00047H-2j for qemu-devel@nongnu.org; Tue, 15 Jun 2010 09:59:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62088) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOWg8-000479-Pi for qemu-devel@nongnu.org; Tue, 15 Jun 2010 09:59:49 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5FDxkg7008918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Jun 2010 09:59:48 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5FDxiwe022657 for ; Tue, 15 Jun 2010 09:59:45 -0400 Message-ID: <4C178750.2080109@redhat.com> Date: Tue, 15 Jun 2010 16:59:44 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 5/5] ide: fix migration in the middle of a bmdma transfer References: <31e7e4aefc644057186f501bfef4584d337a4d9c.1276607973.git.quintela@redhat.com> In-Reply-To: <31e7e4aefc644057186f501bfef4584d337a4d9c.1276607973.git.quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org 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