1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2023 Advanced Micro Devices, Inc. */
8 #include <linux/vfio_pci_core.h>
13 struct pds_vfio_pci_device
{
14 struct vfio_pci_core_device vfio_coredev
;
16 struct pds_vfio_lm_file
*save_file
;
17 struct pds_vfio_lm_file
*restore_file
;
18 struct pds_vfio_dirty dirty
;
19 struct mutex state_mutex
; /* protect migration state */
20 enum vfio_device_mig_state state
;
21 struct notifier_block nb
;
27 const struct vfio_device_ops
*pds_vfio_ops_info(void);
28 struct pds_vfio_pci_device
*pds_vfio_pci_drvdata(struct pci_dev
*pdev
);
29 void pds_vfio_reset(struct pds_vfio_pci_device
*pds_vfio
,
30 enum vfio_device_mig_state state
);
32 struct pci_dev
*pds_vfio_to_pci_dev(struct pds_vfio_pci_device
*pds_vfio
);
33 struct device
*pds_vfio_to_dev(struct pds_vfio_pci_device
*pds_vfio
);
35 #endif /* _VFIO_DEV_H_ */