All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC] drivers/vfio: Allow type-1 IOMMU instantiation with Renesas IPMMU-VMSA
@ 2018-07-25 13:34 ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-07-25 13:34 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Magnus Damm, Laurent Pinchart, kvm, iommu, linux-renesas-soc,
	Geert Uytterhoeven

The Renesas IPMMU-VMSA driver is compatible with the notion of a type-1
IOMMU in VFIO.

This patch allows guests to use the VFIO_IOMMU_TYPE1 API on hosts
equipped with a Renesas VMSA-compatible IPMMU.

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

For testing, this patch and all prerequisites are available in the
topic/rcar3-virt-gpio-passthrough-v3 branch of my git repository at
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
---
 drivers/vfio/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
index c84333eb5eb59bef..a3e21e7c066596d7 100644
--- a/drivers/vfio/Kconfig
+++ b/drivers/vfio/Kconfig
@@ -21,7 +21,8 @@ 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_SMMU || ARM_SMMU_V3 || \
+				    IPMMU_VMSA)
 	select ANON_INODES
 	help
 	  VFIO provides a framework for secure userspace device drivers.
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH/RFC] drivers/vfio: Allow type-1 IOMMU instantiation with Renesas IPMMU-VMSA
@ 2018-07-25 13:34 ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-07-25 13:34 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Laurent Pinchart, kvm-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
	Magnus Damm, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

The Renesas IPMMU-VMSA driver is compatible with the notion of a type-1
IOMMU in VFIO.

This patch allows guests to use the VFIO_IOMMU_TYPE1 API on hosts
equipped with a Renesas VMSA-compatible IPMMU.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
Lightly tested with sata_rcar on Renesas R-Car H3 ES2.0.

For testing, this patch and all prerequisites are available in the
topic/rcar3-virt-gpio-passthrough-v3 branch of my git repository at
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
---
 drivers/vfio/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
index c84333eb5eb59bef..a3e21e7c066596d7 100644
--- a/drivers/vfio/Kconfig
+++ b/drivers/vfio/Kconfig
@@ -21,7 +21,8 @@ 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_SMMU || ARM_SMMU_V3 || \
+				    IPMMU_VMSA)
 	select ANON_INODES
 	help
 	  VFIO provides a framework for secure userspace device drivers.
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFC] drivers/vfio: Allow type-1 IOMMU instantiation with Renesas IPMMU-VMSA
@ 2018-07-25 13:48   ` Robin Murphy
  0 siblings, 0 replies; 4+ messages in thread
From: Robin Murphy @ 2018-07-25 13:48 UTC (permalink / raw)
  To: Geert Uytterhoeven, Alex Williamson
  Cc: Laurent Pinchart, kvm, Magnus Damm, linux-renesas-soc, iommu,
	Jean-Philippe Brucker

Hi Geert,

On 25/07/18 14:34, Geert Uytterhoeven wrote:
> The Renesas IPMMU-VMSA driver is compatible with the notion of a type-1
> IOMMU in VFIO.
> 
> This patch allows guests to use the VFIO_IOMMU_TYPE1 API on hosts
> equipped with a Renesas VMSA-compatible IPMMU.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Lightly tested with sata_rcar on Renesas R-Car H3 ES2.0.
> 
> For testing, this patch and all prerequisites are available in the
> topic/rcar3-virt-gpio-passthrough-v3 branch of my git repository at
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
> ---
>   drivers/vfio/Kconfig | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
> index c84333eb5eb59bef..a3e21e7c066596d7 100644
> --- a/drivers/vfio/Kconfig
> +++ b/drivers/vfio/Kconfig
> @@ -21,7 +21,8 @@ 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_SMMU || ARM_SMMU_V3 || \
> +				    IPMMU_VMSA)

I recall this came up in the context of virtio-iommu too[1], wherein we 
decided that listing individual drivers was actually a bit silly and 
this should simply have ARM || ARM64 for consistency. Looks like there's 
even more justification now :)

Robin.

[1] https://www.mail-archive.com/kvmarm@lists.cs.columbia.edu/msg16235.html

>   	select ANON_INODES
>   	help
>   	  VFIO provides a framework for secure userspace device drivers.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFC] drivers/vfio: Allow type-1 IOMMU instantiation with Renesas IPMMU-VMSA
@ 2018-07-25 13:48   ` Robin Murphy
  0 siblings, 0 replies; 4+ messages in thread
From: Robin Murphy @ 2018-07-25 13:48 UTC (permalink / raw)
  To: Geert Uytterhoeven, Alex Williamson
  Cc: Laurent Pinchart, kvm-u79uwXL29TY76Z2rM5mHXA, Magnus Damm,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Hi Geert,

On 25/07/18 14:34, Geert Uytterhoeven wrote:
> The Renesas IPMMU-VMSA driver is compatible with the notion of a type-1
> IOMMU in VFIO.
> 
> This patch allows guests to use the VFIO_IOMMU_TYPE1 API on hosts
> equipped with a Renesas VMSA-compatible IPMMU.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> ---
> Lightly tested with sata_rcar on Renesas R-Car H3 ES2.0.
> 
> For testing, this patch and all prerequisites are available in the
> topic/rcar3-virt-gpio-passthrough-v3 branch of my git repository at
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
> ---
>   drivers/vfio/Kconfig | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
> index c84333eb5eb59bef..a3e21e7c066596d7 100644
> --- a/drivers/vfio/Kconfig
> +++ b/drivers/vfio/Kconfig
> @@ -21,7 +21,8 @@ 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_SMMU || ARM_SMMU_V3 || \
> +				    IPMMU_VMSA)

I recall this came up in the context of virtio-iommu too[1], wherein we 
decided that listing individual drivers was actually a bit silly and 
this should simply have ARM || ARM64 for consistency. Looks like there's 
even more justification now :)

Robin.

[1] https://www.mail-archive.com/kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org/msg16235.html

>   	select ANON_INODES
>   	help
>   	  VFIO provides a framework for secure userspace device drivers.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-25 15:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 13:34 [PATCH/RFC] drivers/vfio: Allow type-1 IOMMU instantiation with Renesas IPMMU-VMSA Geert Uytterhoeven
2018-07-25 13:34 ` Geert Uytterhoeven
2018-07-25 13:48 ` Robin Murphy
2018-07-25 13:48   ` Robin Murphy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.