On Wed, Apr 24, 2024 at 03:34:19AM +0000, Zeng, Xin wrote: > > > Like if it halts all queues and keeps them halted, while still > > > allowing queue head/tail pointer updats then it would be a fine > > > implementation for P2P. > > > > Yes that really depends. e.g. a queue accepting direct stores (MOVDIR64B) > > for work submission may have problem if that store is simply abandoned > > when the queue is disabled. ENQCMD is possibly OK as unaccepted store > > will get a retry indicator to software so nothing is lost. > > > > I'll let Xin confirm on the QAT implementation (for all device registers). > > If it is like Jason's example then we should provide a clear comment > > clarifying that doing suspend at RUNNING_P2P is safe for QAT as the > > device MMIO interface still works according to the definition of RUNNING > > and no request is lost (either from CPU or peer). There is nothing to stop > > from RUNNING_P2P to STOP because the device doesn't execute any > > request to further change the internal state other than MMIO. > > > > When QAT VF is suspended, all its MMIO registers can still be operated > correctly, jobs submitted through ring are queued while no jobs are > processed by the device. The MMIO states can be safely migrated > to the target VF during stop-copy stage and restored correctly in the > target VF. All queued jobs can be resumed then. > MOVDIR64B mentioned above is not supported by QAT solution, > so it's fine to keep current implementation. > If no objections, I'll append this paragraph of comment in the driver and > post another version. Yes that looks good to me. Jason