aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vfio/pci/vfio_pci_zdev.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-12 16:51:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-12 16:51:22 +0200
commita791dc135325862fdf491ac088f54993710e2515 (patch)
tree3fe941c0d8b8d315ad4b2235836462e0820f98ae /drivers/vfio/pci/vfio_pci_zdev.c
parentdriver core: remove make_class_name declaration (diff)
parentLinux 6.0-rc5 (diff)
downloadlinux-dev-a791dc135325862fdf491ac088f54993710e2515.tar.xz
linux-dev-a791dc135325862fdf491ac088f54993710e2515.zip
Merge 6.0-rc5 into driver-core-next
We need the driver core and debugfs changes in this branch. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 e163aa9f6144..0cbdcd14f1c8 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);
}