aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vfio/vfio.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2022-09-29 11:59:25 -0300
committerAlex Williamson <alex.williamson@redhat.com>2022-10-04 12:06:58 -0600
commitc82e81ab2569559ad873b3061217c2f37560682b (patch)
tree3cdb8747c5bbe641a1f0811aaa403dbc7364ff28 /drivers/vfio/vfio.h
parentvfio: Remove the vfio_group->users and users_comp (diff)
downloadlinux-dev-c82e81ab2569559ad873b3061217c2f37560682b.tar.xz
linux-dev-c82e81ab2569559ad873b3061217c2f37560682b.zip
vfio: Change vfio_group->group_rwsem to a mutex
These days not much is using the read side: - device first open - ioctl_get_status - device FD release - check enforced_coherent None of this is performance, so just make it into a normal mutex. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/2-v1-917e3647f123+b1a-vfio_group_users_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/vfio.h')
-rw-r--r--drivers/vfio/vfio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h
index 78b362a92501..4a1bac1359a9 100644
--- a/drivers/vfio/vfio.h
+++ b/drivers/vfio/vfio.h
@@ -56,7 +56,7 @@ struct vfio_group {
struct list_head vfio_next;
struct list_head container_next;
enum vfio_group_type type;
- struct rw_semaphore group_rwsem;
+ struct mutex group_lock;
struct kvm *kvm;
struct file *opened_file;
struct swait_queue_head opened_file_wait;