Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfio/spapr: Relax the IOMMU compatibility check

We are going to have multiple different types of PHB on the same system
with POWER8 + NVLink and PHBs will have different IOMMU ops. However
we only really care about one callback - create_table - so we can
relax the compatibility check here.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Alexey Kardashevskiy and committed by
Michael Ellerman
54de285b c8ceacc2

+2 -1
+2 -1
drivers/vfio/vfio_iommu_spapr_tce.c
··· 1188 1188 goto unlock_exit; 1189 1189 } 1190 1190 table_group_tmp = iommu_group_get_iommudata(tcegrp->grp); 1191 - if (table_group_tmp->ops != table_group->ops) { 1191 + if (table_group_tmp->ops->create_table != 1192 + table_group->ops->create_table) { 1192 1193 pr_warn("tce_vfio: Group %d is incompatible with group %d\n", 1193 1194 iommu_group_id(iommu_group), 1194 1195 iommu_group_id(tcegrp->grp));