From: Alex Williamson Subject: Re: [PATCH] drivers/vfio: allow type-1 IOMMU instantiation on top of an ARM SMMU Date: Mon, 17 Nov 2014 11:26:27 -0700 Message-ID: <1416248787.27937.257.camel@ul30vt.home> References: <1415972325-7053-1-git-send-email-will.deacon@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1415972325-7053-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Will Deacon Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Fri, 2014-11-14 at 13:38 +0000, Will Deacon wrote: > The ARM SMMU driver is compatible with the notion of a type-1 IOMMU in > VFIO. > > This patch allows VFIO_IOMMU_TYPE1 to be selected if ARM_SMMU=y. > > Signed-off-by: Will Deacon > --- > > Alex: I'm wondering if we can't just drop the dependency clause here > altogether. What breaks if we allow VFIO_IOMMU_TYPE1 to be selected > anywhere? For me it's the same reason that you use the phrase "compatible with the notion of a type-1 IOMMU". The type1 code itself is independent of architecture, but the assumptions and usage model of the IOMMU may not be. If we require these sorts of trivial patches then we at least know that compatible hardware exists and someone has tried it. So I guess I prefer to leave it. Realistically, how many more archs would we really need anyway? > drivers/vfio/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig > index d8c57636b9ce..437ab0bc2879 100644 > --- a/drivers/vfio/Kconfig > +++ b/drivers/vfio/Kconfig > @@ -16,7 +16,7 @@ config VFIO_SPAPR_EEH > menuconfig VFIO > tristate "VFIO Non-Privileged userspace driver framework" > depends on IOMMU_API > - select VFIO_IOMMU_TYPE1 if X86 > + select VFIO_IOMMU_TYPE1 if X86 || ARM_SMMU > select VFIO_IOMMU_SPAPR_TCE if (PPC_POWERNV || PPC_PSERIES) > select VFIO_SPAPR_EEH if (PPC_POWERNV || PPC_PSERIES) > select ANON_INODES Applied, thanks, Alex