summaryrefslogtreecommitdiff
path: root/drivers/vfio/pci/vfio_pci_zdev.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2022-09-08 19:44:34 +0300
committerAlex Williamson <alex.williamson@redhat.com>2022-09-08 19:44:34 +0300
commit71aef261e0be0f7139fa5c05bc15e58385640f93 (patch)
treef58460dbf52963c410b5b268aad623a3af9c51a8 /drivers/vfio/pci/vfio_pci_zdev.c
parenteab60bbc05a9375145e7b793ca37a1b6ec262887 (diff)
parent939838632b9119614128028eaea3b1d7bf29f16f (diff)
downloadlinux-71aef261e0be0f7139fa5c05bc15e58385640f93.tar.xz
Merge remote-tracking branch 'mlx5/mlx5-vfio' into v6.1/vfio/next
Merge net/mlx5 depedencies for device DMA logging and mlx5 variant driver suppport. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci/vfio_pci_zdev.c')
-rw-r--r--drivers/vfio/pci/vfio_pci_zdev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/vfio/pci/vfio_pci_zdev.c b/drivers/vfio/pci/vfio_pci_zdev.c
index 0bff24f0d4d7..0990fdb146b7 100644
--- a/drivers/vfio/pci/vfio_pci_zdev.c
+++ b/drivers/vfio/pci/vfio_pci_zdev.c
@@ -151,7 +151,10 @@ int vfio_pci_zdev_open_device(struct vfio_pci_core_device *vdev)
if (!vdev->vdev.kvm)
return 0;
- return kvm_s390_pci_register_kvm(zdev, vdev->vdev.kvm);
+ if (zpci_kvm_hook.kvm_register)
+ return zpci_kvm_hook.kvm_register(zdev, vdev->vdev.kvm);
+
+ return -ENOENT;
}
void vfio_pci_zdev_close_device(struct vfio_pci_core_device *vdev)
@@ -161,5 +164,6 @@ void vfio_pci_zdev_close_device(struct vfio_pci_core_device *vdev)
if (!zdev || !vdev->vdev.kvm)
return;
- kvm_s390_pci_unregister_kvm(zdev);
+ if (zpci_kvm_hook.kvm_unregister)
+ zpci_kvm_hook.kvm_unregister(zdev);
}