summaryrefslogtreecommitdiff
path: root/samples/kmemleak
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2022-07-04 22:10:50 -0300
committerAlex Williamson <alex.williamson@redhat.com>2022-07-05 16:06:50 -0600
commitafe4e376ac5d568367b447ca90c12858d0935b86 (patch)
tree89e345299ad4ff7242765f11edc7694603b6756d /samples/kmemleak
parent88084a3df1672e131ddc1b4e39eeacfd39864acf (diff)
vfio: Move IOMMU_CAP_CACHE_COHERENCY test to after we know we have a group
The test isn't going to work if a group doesn't exist. Normally this isn't a problem since VFIO isn't going to create a device if there is no group, but the special CONFIG_VFIO_NOIOMMU behavior allows bypassing this prevention. The new cap test effectively forces a group and breaks this config option. Move the cap test to vfio_group_find_or_alloc() which is the earliest time we know we have a group available and thus are not running in noiommu mode. Fixes: e8ae0e140c05 ("vfio: Require that devices support DMA cache coherence") Reported-by: Xiang Chen <chenxiang66@hisilicon.com> Tested-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/0-v1-e8934b490f36+f4-vfio_cap_fix_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'samples/kmemleak')
0 files changed, 0 insertions, 0 deletions