Even if an IOMMU might be present for some PCI segment in the system,
that doesn't necessarily mean it provides translation for the device
we care about. Replace iommu_present() with a more appropriate check.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (found)
return 0;
- if (!user_address || iommu_present(&pci_bus_type)) {
+ if (!user_address || device_iommu_mapped(&hdev->pdev->dev)) {
rc = -EINVAL;
goto err;
}