Skip to contentSkip to conversation

drivers/vfio: allow type-1 IOMMU instantiation on top of an ARM SMMU

PATCH Applied Will Deacon 2 participants 2 messages Nov 14, 2014 – Nov 17, 2014 1 message not in the archive VFIO driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/vfio: allow type-1 IOMMU instantiation on top of an ARM SMMU

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.

---

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?

 drivers/vfio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/Kconfig +1 -1
index d8c57636b9ce..437ab0bc2879 100644
@@ -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
Signature · 1 line
2.1.1

A message that is not in the archive (sent off-list or not yet received): 1415972325-7053-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org

#2 lore raw
Quoted 11 lines · Will Deacon

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.

---

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?

Quoted 8 lines
 drivers/vfio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/Kconfig +0 -0
index d8c57636b9ce..437ab0bc2879 100644

drivers/vfio/Kconfig config VFIO_SPAPR_EEH · line 22

Quoted 8 lines
drivers/vfio/Kconfig +1 -1
@@ -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