]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Change vfio_external_check_extension() to vfio_file_enforced_coherent()
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 4 May 2022 19:14:43 +0000 (16:14 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 13 May 2022 16:14:20 +0000 (10:14 -0600)
commit56c0352245a8f1bd3a3eabd367e439aa8df62373
treed6fd0152cfaec5856b36d73d84f729c02e69d9e2
parentf4912f932c59350bb7687dc6e2230d46caf196cb
vfio: Change vfio_external_check_extension() to vfio_file_enforced_coherent()

Instead of a general extension check change the function into a limited
test if the iommu_domain has enforced coherency, which is the only thing
kvm needs to query.

Make the new op self contained by properly refcounting the container
before touching it.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/5-v3-f7729924a7ea+25e33-vfio_kvm_no_group_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c
include/linux/vfio.h
virt/kvm/vfio.c