aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYi Liu <[email protected]>2023-07-18 06:55:27 -0700
committerAlex Williamson <[email protected]>2023-07-25 10:18:22 -0600
commitb1a59be8a2b64d00409dc7c9d523572ed32bcff8 (patch)
treed92092d0dbc90e7e74611d77ff13b38e5daf174a /include/linux
parentb1a3b5c61d27299799a61e50e08f507b2e9a8a75 (diff)
vfio: Refine vfio file kAPIs for KVM
This prepares for making the below kAPIs to accept both group file and device file instead of only vfio group file. bool vfio_file_enforced_coherent(struct file *file); void vfio_file_set_kvm(struct file *file, struct kvm *kvm); Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Eric Auger <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Tested-by: Terrence Xu <[email protected]> Tested-by: Nicolin Chen <[email protected]> Tested-by: Matthew Rosato <[email protected]> Tested-by: Yanting Jiang <[email protected]> Tested-by: Shameer Kolothum <[email protected]> Tested-by: Zhenzhong Duan <[email protected]> Signed-off-by: Yi Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/vfio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 7079911edfb1..06a5221949c5 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -272,6 +272,7 @@ int vfio_mig_get_next_state(struct vfio_device *device,
*/
struct iommu_group *vfio_file_iommu_group(struct file *file);
bool vfio_file_is_group(struct file *file);
+bool vfio_file_is_valid(struct file *file);
bool vfio_file_enforced_coherent(struct file *file);
void vfio_file_set_kvm(struct file *file, struct kvm *kvm);
bool vfio_file_has_dev(struct file *file, struct vfio_device *device);