]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Export the device set open count
authorAnthony DeRossi <ajderossi@gmail.com>
Thu, 10 Nov 2022 01:40:26 +0000 (17:40 -0800)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 10 Nov 2022 19:03:36 +0000 (12:03 -0700)
commit3021fd49ea636afdd369d833f58ff3c9214b6c66
treeb5b0615bcd0526bd0a88ee73e7554de299bbd8b6
parente695f6a547d3eb30b0e5c179671fe11060a225d7
vfio: Export the device set open count

The open count of a device set is the sum of the open counts of all
devices in the set. Drivers can use this value to determine whether
shared resources are in use without tracking them manually or accessing
the private open_count in vfio_device.

Signed-off-by: Anthony DeRossi <ajderossi@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Link: https://lore.kernel.org/r/20221110014027.28780-3-ajderossi@gmail.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_main.c
include/linux/vfio.h