> From: Alex Williamson <alex.williamson@xxxxxxxxxx> > Sent: Friday, June 17, 2022 7:01 AM > > The whole mig_ops handling seems rather ad-hoc to me. What tells a > developer when mig_ops can be set? Can they be unset? Does this > enable a device feature callout to dynamically enable migration? Why do > we init the device with vfio_device_ops, but then open code per driver > setting vfio_migration_ops? > A simpler fix could be treating device->migration_flags==0 as indicator of no support of migration. w/o additional flags only RUNNING and ERROR states are supported which cannot support migration. Failing the related device feature ops in such case sounds clearer to me.