diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2022-05-11 13:13:00 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2022-05-11 13:13:00 -0600 |
commit | eadd86f835c63769febbd056dfcb70dafef0d4b3 (patch) | |
tree | 40a4e2e36aaf2a4e15e5130bae1703124dad0243 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 231657b345046552b35670b45b892cfce2610e12 (diff) |
vfio: Remove calls to vfio_group_add_container_user()
When the open_device() op is called the container_users is incremented and
held incremented until close_device(). Thus, so long as drivers call
functions within their open_device()/close_device() region they do not
need to worry about the container_users.
These functions can all only be called between open_device() and
close_device():
vfio_pin_pages()
vfio_unpin_pages()
vfio_dma_rw()
vfio_register_notifier()
vfio_unregister_notifier()
Eliminate the calls to vfio_group_add_container_user() and add
vfio_assert_device_open() to detect driver mis-use. This causes the
close_device() op to check device->open_count so always leave it elevated
while calling the op.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/7-v4-8045e76bf00b+13d-vfio_mdev_no_group_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions