On Thu, Oct 27, 2016 at 01:22:29PM +0100, Dr. David Alan Gilbert wrote: > * Eduardo Habkost (ehabk...@redhat.com) wrote: > > On Thu, Oct 27, 2016 at 09:42:53AM +0300, Dmitry Fleytman wrote: > > > > > > > On 26 Oct 2016, at 22:21 PM, Eduardo Habkost <ehabk...@redhat.com> > > > > wrote: > > > > > > > > The user (or management software) is responsible for keeping the > > > > same configuration on both sides while migrating. Remove the > > > > configuration validation code at e1000e_post_load, and the > > > > unnecessary subsys_used/subsys_ven_used fields. > > > > > > Migration with different subsys/subsys_ven may have a > > > really cumbersome consequences that are very hard to debug, > > > so I believe such a verification may save a lot of time, > > > however it’s a matter of convention. > > > > The same issues apply to almost every other property on every > > other device. But the convention is to not expect devices to > > validate configuration changes on migration. > > > > (It would be nice to have a more generic mechanism that detects > > configuration mismatch on migration, though. Having each device > > manually checking each of its properties wouldn't work). > > Without knowing the e1000e code, isn't the easy way to do this > to change the: > > VMSTATE_UINT16(subsys, E1000EState), > VMSTATE_UINT16(subsys_ven, E1000EState), > to > > VMSTATE_UINT16_EQUAL(subsys, E1000EState), > VMSTATE_UINT16_EQUAL(subsys_ven, E1000EState), > > and the migration code will flag if they don't match for you.
That's very useful. I didn't know about it. I will submit a new version of the series that uses VMSTATE_UINT16_EQUAL. -- Eduardo