Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754787AbbG3KMW (ORCPT ); Thu, 30 Jul 2015 06:12:22 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:37013 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754638AbbG3KMU (ORCPT ); Thu, 30 Jul 2015 06:12:20 -0400 MIME-Version: 1.0 In-Reply-To: <1438250724-4443-1-git-send-email-joro@8bytes.org> References: <1438250724-4443-1-git-send-email-joro@8bytes.org> From: Oded Gabbay Date: Thu, 30 Jul 2015 13:11:50 +0300 Message-ID: Subject: Re: [PATCH] iommu/amd: Allow non-ATS devices in IOMMUv2 domains To: Joerg Roedel Cc: iommu@lists.linux-foundation.org, "Linux-Kernel@Vger. Kernel. Org" , Joerg Roedel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1567 Lines: 42 On Thu, Jul 30, 2015 at 1:05 PM, Joerg Roedel wrote: > From: Joerg Roedel > > With the grouping of multi-function devices a non-ATS > capable device might also end up in the same domain as an > IOMMUv2 capable device. > So handle this situation gracefully and don't consider it a > bug anymore. > > Signed-off-by: Joerg Roedel > --- > drivers/iommu/amd_iommu.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > index fa9508b..658ee39 100644 > --- a/drivers/iommu/amd_iommu.c > +++ b/drivers/iommu/amd_iommu.c > @@ -3318,7 +3318,12 @@ static int __flush_pasid(struct protection_domain *domain, int pasid, > struct amd_iommu *iommu; > int qdep; > > - BUG_ON(!dev_data->ats.enabled); > + /* > + There might be non-IOMMUv2 capable devices in an IOMMUv2 > + * domain. > + */ > + if (!dev_data->ats.enabled) > + continue; > > qdep = dev_data->ats.qdep; > iommu = amd_iommu_rlookup_table[dev_data->devid]; > -- > 1.9.1 > This series, with the additional patch is: Tested-by: "Oded Gabbay " -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/