1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright(c) 2024 Intel Corporation */
3 #ifndef QAT_MIG_DEV_H_
4 #define QAT_MIG_DEV_H_
5 
6 struct pci_dev;
7 
8 struct qat_mig_dev {
9 	void *parent_accel_dev;
10 	u8 *state;
11 	u32 setup_size;
12 	u32 remote_setup_size;
13 	u32 state_size;
14 	s32 vf_id;
15 };
16 
17 struct qat_mig_dev *qat_vfmig_create(struct pci_dev *pdev, int vf_id);
18 int qat_vfmig_init(struct qat_mig_dev *mdev);
19 void qat_vfmig_cleanup(struct qat_mig_dev *mdev);
20 void qat_vfmig_reset(struct qat_mig_dev *mdev);
21 int qat_vfmig_open(struct qat_mig_dev *mdev);
22 void qat_vfmig_close(struct qat_mig_dev *mdev);
23 int qat_vfmig_suspend(struct qat_mig_dev *mdev);
24 int qat_vfmig_resume(struct qat_mig_dev *mdev);
25 int qat_vfmig_save_state(struct qat_mig_dev *mdev);
26 int qat_vfmig_save_setup(struct qat_mig_dev *mdev);
27 int qat_vfmig_load_state(struct qat_mig_dev *mdev);
28 int qat_vfmig_load_setup(struct qat_mig_dev *mdev, int size);
29 void qat_vfmig_destroy(struct qat_mig_dev *mdev);
30 
31 #endif /*QAT_MIG_DEV_H_*/
32