#include <linux/anon_inodes.h>
#include <linux/container_of.h>
#include <linux/device.h>
#include <linux/file.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/sizes.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/vfio_pci_core.h>
#include <linux/qat/qat_mig_dev.h>
struct qat_vf_migration_file { … };
struct qat_vf_core_device { … };
static int qat_vf_pci_open_device(struct vfio_device *core_vdev)
{ … }
static void qat_vf_disable_fd(struct qat_vf_migration_file *migf)
{ … }
static void qat_vf_disable_fds(struct qat_vf_core_device *qat_vdev)
{ … }
static void qat_vf_pci_close_device(struct vfio_device *core_vdev)
{ … }
static long qat_vf_precopy_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{ … }
static ssize_t qat_vf_save_read(struct file *filp, char __user *buf,
size_t len, loff_t *pos)
{ … }
static int qat_vf_release_file(struct inode *inode, struct file *filp)
{ … }
static const struct file_operations qat_vf_save_fops = …;
static int qat_vf_save_state(struct qat_vf_core_device *qat_vdev,
struct qat_vf_migration_file *migf)
{ … }
static int qat_vf_save_setup(struct qat_vf_core_device *qat_vdev,
struct qat_vf_migration_file *migf)
{ … }
static struct qat_vf_migration_file *
qat_vf_save_device_data(struct qat_vf_core_device *qat_vdev, bool pre_copy)
{ … }
static ssize_t qat_vf_resume_write(struct file *filp, const char __user *buf,
size_t len, loff_t *pos)
{ … }
static const struct file_operations qat_vf_resume_fops = …;
static struct qat_vf_migration_file *
qat_vf_resume_device_data(struct qat_vf_core_device *qat_vdev)
{ … }
static int qat_vf_load_device_data(struct qat_vf_core_device *qat_vdev)
{ … }
static struct file *qat_vf_pci_step_device_state(struct qat_vf_core_device *qat_vdev, u32 new)
{ … }
static void qat_vf_reset_done(struct qat_vf_core_device *qat_vdev)
{ … }
static struct file *qat_vf_pci_set_device_state(struct vfio_device *vdev,
enum vfio_device_mig_state new_state)
{ … }
static int qat_vf_pci_get_device_state(struct vfio_device *vdev,
enum vfio_device_mig_state *curr_state)
{ … }
static int qat_vf_pci_get_data_size(struct vfio_device *vdev,
unsigned long *stop_copy_length)
{ … }
static const struct vfio_migration_ops qat_vf_pci_mig_ops = …;
static void qat_vf_pci_release_dev(struct vfio_device *core_vdev)
{ … }
static int qat_vf_pci_init_dev(struct vfio_device *core_vdev)
{ … }
static const struct vfio_device_ops qat_vf_pci_ops = …;
static struct qat_vf_core_device *qat_vf_drvdata(struct pci_dev *pdev)
{ … }
static void qat_vf_pci_aer_reset_done(struct pci_dev *pdev)
{ … }
static int
qat_vf_vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{ … }
static void qat_vf_vfio_pci_remove(struct pci_dev *pdev)
{ … }
static const struct pci_device_id qat_vf_vfio_pci_table[] = …;
MODULE_DEVICE_TABLE(pci, qat_vf_vfio_pci_table);
static const struct pci_error_handlers qat_vf_err_handlers = …;
static struct pci_driver qat_vf_vfio_pci_driver = …;
module_pci_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_IMPORT_NS(…);