[Intel-gfx] [PATCH v5 13/19] vfio: Add cdev_device_open_cnt to vfio_group
Jason Gunthorpe
jgg at nvidia.com
Mon Feb 27 19:20:43 UTC 2023
On Mon, Feb 27, 2023 at 03:11:29AM -0800, Yi Liu wrote:
> for counting the devices that are opened via the cdev path. This count
> is increased and decreased by the cdev path. The group path checks it
> to achieve exclusion with the cdev path. With this, only one path (group
> path or cdev path) will claim DMA ownership. This avoids scenarios in
> which devices within the same group may be opened via different paths.
>
> Signed-off-by: Yi Liu <yi.l.liu at intel.com>
> Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> ---
> drivers/vfio/group.c | 33 +++++++++++++++++++++++++++++++++
> drivers/vfio/vfio.h | 3 +++
> 2 files changed, 36 insertions(+)
Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
Jason
More information about the Intel-gfx
mailing list