Message ID | 20220322183854.196063-1-danielhb413@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | use dc->vmsd with spapr devices vmstate | expand |
On Tue, Mar 22, 2022 at 03:38:50PM -0300, Daniel Henrique Barboza wrote: > Hi, > > This short series converts some spapr devices to use the dc->vmsd > interface to register the vmstate. For most of them it was needed > to use qdev_set_legacy_instance_id() to keep compatibility with the > instance_id being used for awhile. > > Although no functional changes were made the resulting code is a bit > shorter and maintainable. After these patches there are only 3 places > where vmstate_register() APIs are being used. > > No behavior changes were detected when testing migration scenarios with > hotplug/unplug of devices. Looks good tome.
On 3/22/22 22:49, David Gibson wrote: > On Tue, Mar 22, 2022 at 03:38:50PM -0300, Daniel Henrique Barboza wrote: >> Hi, >> >> This short series converts some spapr devices to use the dc->vmsd >> interface to register the vmstate. For most of them it was needed >> to use qdev_set_legacy_instance_id() to keep compatibility with the >> instance_id being used for awhile. >> >> Although no functional changes were made the resulting code is a bit >> shorter and maintainable. After these patches there are only 3 places >> where vmstate_register() APIs are being used. >> >> No behavior changes were detected when testing migration scenarios with >> hotplug/unplug of devices. > > Looks good tome. It looked good to me until, after further testing, I noticed that patch 03 breaks backward migration: qemu_loadvm_state_section_startfull 560 (spapr_iommu) 0 2 qemu-system-ppc64: Unknown savevm section or instance 'spapr_iommu' 0. Make sure that your current VM setup matches your saved VM setup, including any hotplugged devices qemu-system-ppc64: load of migration failed: Invalid argument I made a follow-up in the instance_id discussion [1] about it. For now patches 1-3 are compromised. Only patch 04 is worth considering because the spapr_nvdimm device isn't setting a custom instance_id. [1] https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg05942.html Thanks, Daniel >