]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vfio: Add external user check extension interface
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 26 Feb 2014 18:38:39 +0000 (11:38 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 26 Feb 2014 18:38:39 +0000 (11:38 -0700)
This lets us check extensions, particularly VFIO_DMA_CC_IOMMU using
the external user interface, allowing KVM to probe IOMMU coherency.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c
include/linux/vfio.h

index 21271d8df02374aaae378c552ff7ad10b89e6e84..512f479d8a50af5eb95c2717bb9a225b9a4e6bfa 100644 (file)
@@ -1413,6 +1413,12 @@ int vfio_external_user_iommu_id(struct vfio_group *group)
 }
 EXPORT_SYMBOL_GPL(vfio_external_user_iommu_id);
 
+long vfio_external_check_extension(struct vfio_group *group, unsigned long arg)
+{
+       return vfio_ioctl_check_extension(group->container, arg);
+}
+EXPORT_SYMBOL_GPL(vfio_external_check_extension);
+
 /**
  * Module/class support
  */
index 24579a0312a0c45dca0216d137721e0381d8c11d..81022a52bc34dcf13cdbcca401a44b5595abfdf6 100644 (file)
@@ -96,5 +96,7 @@ extern void vfio_unregister_iommu_driver(
 extern struct vfio_group *vfio_group_get_external_user(struct file *filep);
 extern void vfio_group_put_external_user(struct vfio_group *group);
 extern int vfio_external_user_iommu_id(struct vfio_group *group);
+extern long vfio_external_check_extension(struct vfio_group *group,
+                                         unsigned long arg);
 
 #endif /* VFIO_H */