From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753988AbcD2Plz (ORCPT ); Fri, 29 Apr 2016 11:41:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41642 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752964AbcD2Plx (ORCPT ); Fri, 29 Apr 2016 11:41:53 -0400 Date: Fri, 29 Apr 2016 09:41:46 -0600 From: Alex Williamson To: Alexey Kardashevskiy Cc: linuxppc-dev@lists.ozlabs.org, Alistair Popple , Benjamin Herrenschmidt , Dan Carpenter , Daniel Axtens , David Gibson , Gavin Shan , Russell Currey , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH kernel v4 02/11] vfio/spapr: Relax the IOMMU compatibility check Message-ID: <20160429094146.4ed23f4b@t450s.home> In-Reply-To: <1461920124-21719-3-git-send-email-aik@ozlabs.ru> References: <1461920124-21719-1-git-send-email-aik@ozlabs.ru> <1461920124-21719-3-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Apr 2016 18:55:15 +1000 Alexey Kardashevskiy wrote: > 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 > Reviewed-by: David Gibson > --- > drivers/vfio/vfio_iommu_spapr_tce.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c > index 0582b72..3054e3f 100644 > --- a/drivers/vfio/vfio_iommu_spapr_tce.c > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -1188,7 +1188,8 @@ static int tce_iommu_attach_group(void *iommu_data, > goto unlock_exit; > } > table_group_tmp = iommu_group_get_iommudata(tcegrp->grp); > - if (table_group_tmp->ops != table_group->ops) { > + if (table_group_tmp->ops->create_table != > + table_group->ops->create_table) { > pr_warn("tce_vfio: Group %d is incompatible with group %d\n", > iommu_group_id(iommu_group), > iommu_group_id(tcegrp->grp)); Acked-by: Alex Williamson