summaryrefslogtreecommitdiff
path: root/drivers/vfio/pci/mlx5/cmd.h
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@nvidia.com>2022-02-24 16:20:22 +0200
committerLeon Romanovsky <leonro@nvidia.com>2022-03-03 13:01:19 +0200
commit6fadb021266d03c5fd7bca2cfa1607efd246dad1 (patch)
treef29956cf271921a8f40ab83536d3dfe018e535a8 /drivers/vfio/pci/mlx5/cmd.h
parentf1d98f346ee34ef41369ace9f91fc4f46a3e30cb (diff)
downloadlwn-6fadb021266d03c5fd7bca2cfa1607efd246dad1.tar.gz
lwn-6fadb021266d03c5fd7bca2cfa1607efd246dad1.zip
vfio/mlx5: Implement vfio_pci driver for mlx5 devices
This patch adds support for vfio_pci driver for mlx5 devices. It uses vfio_pci_core to register to the VFIO subsystem and then implements the mlx5 specific logic in the migration area. The migration implementation follows the definition from uapi/vfio.h and uses the mlx5 VF->PF command channel to achieve it. This patch implements the suspend/resume flows. Link: https://lore.kernel.org/all/20220224142024.147653-14-yishaih@nvidia.com Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'drivers/vfio/pci/mlx5/cmd.h')
-rw-r--r--drivers/vfio/pci/mlx5/cmd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vfio/pci/mlx5/cmd.h b/drivers/vfio/pci/mlx5/cmd.h
index 69a1481ed953..1392a11a9cc0 100644
--- a/drivers/vfio/pci/mlx5/cmd.h
+++ b/drivers/vfio/pci/mlx5/cmd.h
@@ -12,6 +12,7 @@
struct mlx5_vf_migration_file {
struct file *filp;
struct mutex lock;
+ bool disabled;
struct sg_append_table table;
size_t total_length;