Re: [PATCH v5 08/10] crypto: qat - add interface for live migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jason,

On Fri, Mar 08, 2024 at 12:52:32PM -0400, Jason Gunthorpe wrote:
> On Wed, Mar 06, 2024 at 09:58:53PM +0800, Xin Zeng wrote:
> > @@ -258,6 +259,20 @@ struct adf_dc_ops {
> >  	void (*build_deflate_ctx)(void *ctx);
> >  };
> >  
> > +struct qat_migdev_ops {
> > +	int (*init)(struct qat_mig_dev *mdev);
> > +	void (*cleanup)(struct qat_mig_dev *mdev);
> > +	void (*reset)(struct qat_mig_dev *mdev);
> > +	int (*open)(struct qat_mig_dev *mdev);
> > +	void (*close)(struct qat_mig_dev *mdev);
> > +	int (*suspend)(struct qat_mig_dev *mdev);
> > +	int (*resume)(struct qat_mig_dev *mdev);
> > +	int (*save_state)(struct qat_mig_dev *mdev);
> > +	int (*save_setup)(struct qat_mig_dev *mdev);
> > +	int (*load_state)(struct qat_mig_dev *mdev);
> > +	int (*load_setup)(struct qat_mig_dev *mdev, int size);
> > +};
> 
> Why do we still have these ops? There is only one implementation
This is related to the architecture of the QAT driver. The core QAT
module (intel_qat.ko), which exposes the functions required for live
migration, supports multiple devices. Each QAT specific driver registers
the functions that it supports.

Even if live migration is currently supported only by QAT GEN4 devices,
my preference is to keep the qat_vfio_pci module to invoke GEN agnostic
functions. Also, I would prefer to avoid having such functions calling
directly the GEN4 specific implementation.

Regards,

-- 
Giovanni




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux