From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv7um-0004eg-Hv for qemu-devel@nongnu.org; Tue, 15 Jan 2013 09:55:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv7ul-0005Mk-6e for qemu-devel@nongnu.org; Tue, 15 Jan 2013 09:55:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv7uk-0005MC-TG for qemu-devel@nongnu.org; Tue, 15 Jan 2013 09:54:59 -0500 From: Juan Quintela In-Reply-To: (Jason Baron's message of "Fri, 4 Jan 2013 14:44:42 -0500") References: Date: Tue, 15 Jan 2013 15:54:57 +0100 Message-ID: <87bocqts1q.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 2/2] ahci: add migration support Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel qemu-devel Cc: kwolf@redhat.com, i.mitsyanko@samsung.com, jan.kiszka@siemens.com, agraf@suse.de, aderumier@odiso.com, yamahata@valinux.co.jp, afaerber@suse.de Jason Baron wrote: > From: Jason Baron > > I've tested these patches by migrating Windows 7 and Fedora 17 guests (wh= ile > uunder i/o) on both piix with ahci attached and on q35 (which has a built= -in > ahci controller). > > Changes from v2: > -migrate all relevant ahci fields > -flush any pending i/o in 'post_load' > > Changes from v1: > -extend Andreas F=C3=A4rber's patch > > Signed-off-by: Jason Baron > Signed-off-by: Andreas F=C3=A4rber > Cc: Alexander Graf > Cc: Kevin Wolf > Cc: Juan Quintela > Cc: Igor Mitsyanko > --- > hw/ide/ahci.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++= +++++- > hw/ide/ahci.h | 10 +++++++ > hw/ide/ich.c | 11 +++++-- > 3 files changed, 97 insertions(+), 4 deletions(-) > > diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c > index 72cd1c8..96f224b 100644 > --- a/hw/ide/ahci.c > +++ b/hw/ide/ahci.c > @@ -1199,6 +1199,81 @@ void ahci_reset(AHCIState *s) > } > } >=20=20 > +static const VMStateDescription vmstate_ahci_device =3D { > + .name =3D "ahci port", I will try to be consistent here, vmstate_ahci_port or "ahci device" > index de39b30..0c4206a 100644 > --- a/hw/ide/ich.c > +++ b/hw/ide/ich.c > @@ -79,9 +79,14 @@ > #define ICH9_IDP_INDEX 0x10 > #define ICH9_IDP_INDEX_LOG2 0x04 >=20=20 > -static const VMStateDescription vmstate_ahci =3D { > +static const VMStateDescription vmstate_ich9_ahci =3D { > .name =3D "ahci", > - .unmigratable =3D 1, I will also preffer here to be consistent between name of the variable ad name of the section. > + .version_id =3D 1, > + .fields =3D (VMStateField []) { > + VMSTATE_PCI_DEVICE(card, AHCIPCIState), > + VMSTATE_AHCI(ahci, AHCIPCIState), > + VMSTATE_END_OF_LIST() > + }, > }; >=20=20 > static void pci_ich9_reset(DeviceState *dev) > @@ -152,7 +157,7 @@ static void ich_ahci_class_init(ObjectClass *klass, v= oid *data) > k->device_id =3D PCI_DEVICE_ID_INTEL_82801IR; > k->revision =3D 0x02; > k->class_id =3D PCI_CLASS_STORAGE_SATA; > - dc->vmsd =3D &vmstate_ahci; > + dc->vmsd =3D &vmstate_ich9_ahci; Both comments are stylist, nothing big. Change if you have to resent/whoever merge it. Kevin? Later, Juan.