Jason Baron <jba...@redhat.com> wrote: > From: Jason Baron <jba...@redhat.com> > > I've tested these patches by migrating Windows 7 and Fedora 17 guests (while > 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ärber's patch > > Signed-off-by: Jason Baron <jba...@redhat.com> > Signed-off-by: Andreas Färber <afaer...@suse.de> > Cc: Alexander Graf <ag...@suse.de> > Cc: Kevin Wolf <kw...@redhat.com> > Cc: Juan Quintela <quint...@redhat.com> > Cc: Igor Mitsyanko <i.mitsya...@samsung.com> > --- > 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) > } > } > > +static const VMStateDescription vmstate_ahci_device = { > + .name = "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 > > -static const VMStateDescription vmstate_ahci = { > +static const VMStateDescription vmstate_ich9_ahci = { > .name = "ahci", > - .unmigratable = 1, I will also preffer here to be consistent between name of the variable ad name of the section. > + .version_id = 1, > + .fields = (VMStateField []) { > + VMSTATE_PCI_DEVICE(card, AHCIPCIState), > + VMSTATE_AHCI(ahci, AHCIPCIState), > + VMSTATE_END_OF_LIST() > + }, > }; > > static void pci_ich9_reset(DeviceState *dev) > @@ -152,7 +157,7 @@ static void ich_ahci_class_init(ObjectClass *klass, void > *data) > k->device_id = PCI_DEVICE_ID_INTEL_82801IR; > k->revision = 0x02; > k->class_id = PCI_CLASS_STORAGE_SATA; > - dc->vmsd = &vmstate_ahci; > + dc->vmsd = &vmstate_ich9_ahci; Both comments are stylist, nothing big. Change if you have to resent/whoever merge it. Kevin? Later, Juan.