aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2022-11-29 16:31:47 -0400
committerJason Gunthorpe <[email protected]>2022-12-02 11:52:03 -0400
commitbab6fabc01d99c7e0293807e835231740379b692 (patch)
treeb7d0e509f059d386f6dc8adc4da286856f620183 /tools/perf/scripts/python/export-to-sqlite.py
parent294aaccb50130f596943be892c5d3a3568b76c57 (diff)
vfio: Move vfio_device_assign_container() into vfio_device_first_open()
The only thing this function does is assert the group has an assigned container and incrs refcounts. The overall model we have is that once a container_users refcount is incremented it cannot be de-assigned from the group - vfio_group_ioctl_unset_container() will fail and the group FD cannot be closed. Thus we do not need to check this on every device FD open, just the first. Reorganize the code so that only the first open and last close manages the container. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Yi Liu <[email protected]> Reviewed-by: Alex Williamson <[email protected]> Tested-by: Alex Williamson <[email protected]> Tested-by: Nicolin Chen <[email protected]> Tested-by: Yi Liu <[email protected]> Tested-by: Lixiao Yang <[email protected]> Tested-by: Matthew Rosato <[email protected]> Tested-by: Yu He <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions