vfio/iommu_type1: Mantain a counter for non_pinned_groups
authorKeqian Zhu <zhukeqian1@huawei.com>
Mon, 25 Jan 2021 02:46:42 +0000 (10:46 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Feb 2021 20:40:52 +0000 (13:40 -0700)
commit010321565a7d2cd73eeed6f589693ce752e154bd
treeee6a988bdbe26047c719de46b39c59aa41346369
parent4a19f37a3dd3f29997735e61b25ddad24b8abe73
vfio/iommu_type1: Mantain a counter for non_pinned_groups

With this counter, we never need to traverse all groups to update
pinned_scope of vfio_iommu.

Suggested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c