Skip to content

Commit f44efca

Browse files
Andre-ARMawilliam
authored andcommitted
vfio: Ignore -ENODEV when getting MSI cookie
When we try to get an MSI cookie for a VFIO device, that can fail if CONFIG_IOMMU_DMA is not set. In this case iommu_get_msi_cookie() returns -ENODEV, and that should not be fatal. Ignore that case and proceed with the initialisation. This fixes VFIO with a platform device on the Calxeda Midway (no MSIs). Fixes: f6810c1 ("iommu/arm-smmu: Clean up early-probing workarounds") Signed-off-by: Andre Przywara <[email protected]> Acked-by: Robin Murphy <[email protected]> Reviewed-by: Eric Auger <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
1 parent 00bc509 commit f44efca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/vfio/vfio_iommu_type1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
17871787

17881788
if (resv_msi) {
17891789
ret = iommu_get_msi_cookie(domain->domain, resv_msi_base);
1790-
if (ret)
1790+
if (ret && ret != -ENODEV)
17911791
goto out_detach;
17921792
}
17931793

0 commit comments

Comments
 (0)