OSDN Git Service

vfio: Convert to use new iommu_capable() API function
authorJoerg Roedel <jroedel@suse.de>
Fri, 5 Sep 2014 08:56:05 +0000 (10:56 +0200)
committerJoerg Roedel <jroedel@suse.de>
Thu, 25 Sep 2014 13:47:45 +0000 (15:47 +0200)
Cc: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/vfio/vfio_iommu_type1.c

index 0734fbe..562f686 100644 (file)
@@ -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;
 
        /*