Skip to content

Commit

Permalink
vfio: Add external user check extension interface
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Williamson committed Feb 26, 2014
1 parent aa42931 commit 88d7ab8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 2 additions & 0 deletions include/linux/vfio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 88d7ab8

Please sign in to comment.