> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Tuesday, July 4, 2023 5:04 AM > > On Mon, Jul 03, 2023 at 01:27:51PM +0800, Cao, Yahui wrote: > > > > > We also don't have any guarentees defined for the VFIO protocol about > > > > what state the vIOMMU will be in prior to reaching RUNNING. > > > This is a good point. Actually it's not just a gap on vIOMMU. it's kind > > > of a dependency on IOMMUFD no matter the IOAS which the migrated > > > device is currently attached to is GPA or GIOVA. The device state can > > > be restored only after IOMMUFD is fully recovered and the device is > > > re-attached to the IOAS. > > > > > > Need a way for migration driver to advocate such dependency to the user. > > > > Since this part is new to me, may need further guidance on how to resolve > > the dependency from you and other community experts. > > Personally I'm quite uncomfortable with a driver that tries to work > this way, I'm not sure we should encourage this. Can Intel really be > convincing that this is safe and correct? > I dislike it too. Will discuss with Yahui on the correctness of this approach and any cleaner alternative.