mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: qat - add interface for live migration
Extend the driver with a new interface to be used for VF live migration. This allows to create and destroy a qat_mig_dev object that contains a set of methods to allow to save and restore the state of QAT VF. This interface will be used by the qat-vfio-pci module. Signed-off-by: Xin Zeng <xin.zeng@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
31
include/linux/qat/qat_mig_dev.h
Normal file
31
include/linux/qat/qat_mig_dev.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright(c) 2024 Intel Corporation */
|
||||
#ifndef QAT_MIG_DEV_H_
|
||||
#define QAT_MIG_DEV_H_
|
||||
|
||||
struct pci_dev;
|
||||
|
||||
struct qat_mig_dev {
|
||||
void *parent_accel_dev;
|
||||
u8 *state;
|
||||
u32 setup_size;
|
||||
u32 remote_setup_size;
|
||||
u32 state_size;
|
||||
s32 vf_id;
|
||||
};
|
||||
|
||||
struct qat_mig_dev *qat_vfmig_create(struct pci_dev *pdev, int vf_id);
|
||||
int qat_vfmig_init(struct qat_mig_dev *mdev);
|
||||
void qat_vfmig_cleanup(struct qat_mig_dev *mdev);
|
||||
void qat_vfmig_reset(struct qat_mig_dev *mdev);
|
||||
int qat_vfmig_open(struct qat_mig_dev *mdev);
|
||||
void qat_vfmig_close(struct qat_mig_dev *mdev);
|
||||
int qat_vfmig_suspend(struct qat_mig_dev *mdev);
|
||||
int qat_vfmig_resume(struct qat_mig_dev *mdev);
|
||||
int qat_vfmig_save_state(struct qat_mig_dev *mdev);
|
||||
int qat_vfmig_save_setup(struct qat_mig_dev *mdev);
|
||||
int qat_vfmig_load_state(struct qat_mig_dev *mdev);
|
||||
int qat_vfmig_load_setup(struct qat_mig_dev *mdev, int size);
|
||||
void qat_vfmig_destroy(struct qat_mig_dev *mdev);
|
||||
|
||||
#endif /*QAT_MIG_DEV_H_*/
|
||||
Reference in New Issue
Block a user