diff mbox series

[v2] drivers/vfio: Allow type-1 IOMMU instantiation with all ARM/ARM64 IOMMUs

Message ID 20180913131529.11837-1-geert+renesas@glider.be (mailing list archive)
State New, archived
Headers show
Series [v2] drivers/vfio: Allow type-1 IOMMU instantiation with all ARM/ARM64 IOMMUs | expand

Commit Message

Geert Uytterhoeven Sept. 13, 2018, 1:15 p.m. UTC
Currently the type-1 IOMMU instantiation depends on "ARM_SMMU ||
ARM_SMMU_V3", while it applies to other ARM/ARM64 platforms with an
IOMMU (e.g. Renesas VMSA-compatible IPMMUs).

Instead of extending the list of IOMMU types on ARM platforms, replace
the list by "ARM || ARM64", like other architectures do.  The feature is
still restricted to ARM/ARM64 platforms with an IOMMU by the dependency
on IOMMU_API.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Tested with sata_rcar on Renesas R-Car H3 ES2.0.

This causes a trivial merge conflict with commit c01eaa95ad30897b ("Make
anon_inodes unconditional") in vfs/for-next.

v2:
  - Make the feature just depend on ARM || ARM64, instead of adding yet
    another IPMMU_VMSA dependency, as suggested by Robin Murphy
    <robin.murphy@arm.com>.
---
 drivers/vfio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Robin Murphy Sept. 13, 2018, 1:24 p.m. UTC | #1
On 13/09/18 14:15, Geert Uytterhoeven wrote:
> Currently the type-1 IOMMU instantiation depends on "ARM_SMMU ||
> ARM_SMMU_V3", while it applies to other ARM/ARM64 platforms with an
> IOMMU (e.g. Renesas VMSA-compatible IPMMUs).
> 
> Instead of extending the list of IOMMU types on ARM platforms, replace
> the list by "ARM || ARM64", like other architectures do.  The feature is
> still restricted to ARM/ARM64 platforms with an IOMMU by the dependency
> on IOMMU_API.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Tested with sata_rcar on Renesas R-Car H3 ES2.0.
> 
> This causes a trivial merge conflict with commit c01eaa95ad30897b ("Make
> anon_inodes unconditional") in vfs/for-next.
> 
> v2:
>    - Make the feature just depend on ARM || ARM64, instead of adding yet
>      another IPMMU_VMSA dependency, as suggested by Robin Murphy
>      <robin.murphy@arm.com>.
> ---
>   drivers/vfio/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
> index c84333eb5eb59bef..9de5ed38da830a91 100644
> --- a/drivers/vfio/Kconfig
> +++ b/drivers/vfio/Kconfig
> @@ -21,7 +21,7 @@ config VFIO_VIRQFD
>   menuconfig VFIO
>   	tristate "VFIO Non-Privileged userspace driver framework"
>   	depends on IOMMU_API
> -	select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM_SMMU || ARM_SMMU_V3)
> +	select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64)
>   	select ANON_INODES
>   	help
>   	  VFIO provides a framework for secure userspace device drivers.
>
Simon Horman Sept. 17, 2018, 7:26 a.m. UTC | #2
On Thu, Sep 13, 2018 at 03:15:29PM +0200, Geert Uytterhoeven wrote:
> Currently the type-1 IOMMU instantiation depends on "ARM_SMMU ||
> ARM_SMMU_V3", while it applies to other ARM/ARM64 platforms with an
> IOMMU (e.g. Renesas VMSA-compatible IPMMUs).
> 
> Instead of extending the list of IOMMU types on ARM platforms, replace
> the list by "ARM || ARM64", like other architectures do.  The feature is
> still restricted to ARM/ARM64 platforms with an IOMMU by the dependency
> on IOMMU_API.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Alex Williamson Sept. 25, 2018, 7:43 p.m. UTC | #3
On Thu, 13 Sep 2018 15:15:29 +0200
Geert Uytterhoeven <geert+renesas@glider.be> wrote:

> Currently the type-1 IOMMU instantiation depends on "ARM_SMMU ||
> ARM_SMMU_V3", while it applies to other ARM/ARM64 platforms with an
> IOMMU (e.g. Renesas VMSA-compatible IPMMUs).
> 
> Instead of extending the list of IOMMU types on ARM platforms, replace
> the list by "ARM || ARM64", like other architectures do.  The feature is
> still restricted to ARM/ARM64 platforms with an IOMMU by the dependency
> on IOMMU_API.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Tested with sata_rcar on Renesas R-Car H3 ES2.0.
> 
> This causes a trivial merge conflict with commit c01eaa95ad30897b ("Make
> anon_inodes unconditional") in vfs/for-next.
> 
> v2:
>   - Make the feature just depend on ARM || ARM64, instead of adding yet
>     another IPMMU_VMSA dependency, as suggested by Robin Murphy
>     <robin.murphy@arm.com>.
> ---
>  drivers/vfio/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
> index c84333eb5eb59bef..9de5ed38da830a91 100644
> --- a/drivers/vfio/Kconfig
> +++ b/drivers/vfio/Kconfig
> @@ -21,7 +21,7 @@ config VFIO_VIRQFD
>  menuconfig VFIO
>  	tristate "VFIO Non-Privileged userspace driver framework"
>  	depends on IOMMU_API
> -	select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM_SMMU || ARM_SMMU_V3)
> +	select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64)
>  	select ANON_INODES
>  	help
>  	  VFIO provides a framework for secure userspace device drivers.

Applied to vfio next branch for v4.20 with Robin and Simon's R-b.
Thanks,

Alex
diff mbox series

Patch

diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
index c84333eb5eb59bef..9de5ed38da830a91 100644
--- a/drivers/vfio/Kconfig
+++ b/drivers/vfio/Kconfig
@@ -21,7 +21,7 @@  config VFIO_VIRQFD
 menuconfig VFIO
 	tristate "VFIO Non-Privileged userspace driver framework"
 	depends on IOMMU_API
-	select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM_SMMU || ARM_SMMU_V3)
+	select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64)
 	select ANON_INODES
 	help
 	  VFIO provides a framework for secure userspace device drivers.