Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb165f05 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

vfio: Convert to use new iommu_capable() API function



Cc: Alex Williamson <alex.williamson@redhat.com>
Acked-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent ee5ba30f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -713,14 +713,14 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
	list_add(&group->next, &domain->group_list);

	if (!allow_unsafe_interrupts &&
	    !iommu_domain_has_cap(domain->domain, IOMMU_CAP_INTR_REMAP)) {
	    !iommu_capable(bus, IOMMU_CAP_INTR_REMAP)) {
		pr_warn("%s: No interrupt remapping support.  Use the module param \"allow_unsafe_interrupts\" to enable VFIO IOMMU support on this platform\n",
		       __func__);
		ret = -EPERM;
		goto out_detach;
	}

	if (iommu_domain_has_cap(domain->domain, IOMMU_CAP_CACHE_COHERENCY))
	if (iommu_capable(bus, IOMMU_CAP_CACHE_COHERENCY))
		domain->prot |= IOMMU_CACHE;

	/*