All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: <huaqian.li@siemens.com>
Cc: <lkp@intel.com>, <baocheng.su@siemens.com>, <bhelgaas@google.com>,
	<christophe.jaillet@wanadoo.fr>, <conor+dt@kernel.org>,
	<devicetree@vger.kernel.org>, <diogo.ivo@siemens.com>,
	<helgaas@kernel.org>, <jan.kiszka@siemens.com>,
	<kristo@kernel.org>, <krzk+dt@kernel.org>, <kw@linux.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<lpieralisi@kernel.org>, <oe-kbuild-all@lists.linux.dev>,
	<robh@kernel.org>, <s-vadapalli@ti.com>, <ssantosh@kernel.org>,
	<vigneshr@ti.com>
Subject: Re: [PATCH v12 3/7] soc: ti: Add IOMMU-like PVU driver
Date: Tue, 29 Jul 2025 07:22:46 -0500	[thread overview]
Message-ID: <20250729122246.o7upnxvqnp7nltdo@harmonize> (raw)
In-Reply-To: <20250728023701.116963-4-huaqian.li@siemens.com>

On 10:36-20250728, huaqian.li@siemens.com wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> The TI Peripheral Virtualization Unit (PVU) permits to define a limited
> set of mappings for DMA requests on the system memory. Unlike with an
> IOMMU, there is no fallback to a memory-backed page table, only a fixed
> set of register-backed TLBs. Emulating an IOMMU behavior appears to be
> the more fragile the more fragmentation of pending requests occur.
> 
> Therefore, this driver does not expose the PVU as an IOMMU. It rather
> introduces a simple, static interface to devices that are under
> restricted-dma-pool constraints. They can register their pools with the
> PVUs, enabling only those pools to work for DMA. As also MSI is issued
> as DMA, the PVU already register the related translator region of the
> AM654 as valid DMA target.
> 
> This driver is the essential building block for limiting DMA from
> untrusted devices to clearly defined memory regions in the absence of a
> real IOMMU (SMMU).
> 
> Co-developed-by: Diogo Ivo <diogo.ivo@siemens.com>
> Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
> ---
>  drivers/soc/ti/Kconfig  |   4 +
>  drivers/soc/ti/Makefile |   1 +
>  drivers/soc/ti/ti-pvu.c | 500 ++++++++++++++++++++++++++++++++++++++++
>  include/linux/ti-pvu.h  |  32 +++
>  4 files changed, 537 insertions(+)
>  create mode 100644 drivers/soc/ti/ti-pvu.c
>  create mode 100644 include/linux/ti-pvu.h
> 
> diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
> index 1a93001c9e36..af7173ad84de 100644
> --- a/drivers/soc/ti/Kconfig
> +++ b/drivers/soc/ti/Kconfig
> @@ -82,6 +82,10 @@ config TI_PRUSS
>  	  processors on various TI SoCs. It's safe to say N here if you're
>  	  not interested in the PRU or if you are unsure.
>  
> +config TI_PVU
> +	bool "TI Peripheral Virtualization Unit driver"

tristate please? Prefer to make this as a module.


-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource


  reply	other threads:[~2025-07-29 12:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28  2:36 [PATCH v12 0/7] soc: ti: Add and use PVU on K3-AM65 for DMA isolation huaqian.li
2025-07-28  2:36 ` [PATCH v12 1/7] dt-bindings: soc: ti: Add AM65 peripheral virtualization unit huaqian.li
2025-07-28  2:36 ` [PATCH v12 2/7] dt-bindings: PCI: ti,am65: Extend for use with PVU huaqian.li
2025-07-28  2:36 ` [PATCH v12 3/7] soc: ti: Add IOMMU-like PVU driver huaqian.li
2025-07-29 12:22   ` Nishanth Menon [this message]
2025-07-29 16:11     ` Jan Kiszka
2025-07-29 16:23       ` Nishanth Menon
2025-07-28  2:36 ` [PATCH v12 4/7] PCI: keystone: Add support for PVU-based DMA isolation on AM654 huaqian.li
2025-07-28  2:36 ` [PATCH v12 5/7] arm64: dts: ti: k3-am65-main: Add PVU nodes huaqian.li
2025-07-28  2:37 ` [PATCH v12 6/7] arm64: dts: ti: k3-am65-main: Add VMAP registers to PCI root complexes huaqian.li
2025-07-28  2:37 ` [PATCH v12 7/7] arm64: dts: ti: iot2050: Add overlay for DMA isolation for devices behind PCI RC huaqian.li
2025-08-27 12:55 ` [PATCH v12 0/7] soc: ti: Add and use PVU on K3-AM65 for DMA isolation Manivannan Sadhasivam
2025-08-28 11:24   ` [PATCH v12 0/7] soc: ti: Add and use PVU on K3-AM65 for DMA huaqian.li
2025-08-28 12:04     ` Nishanth Menon
2025-08-28 15:53 ` (subset) [PATCH v12 0/7] soc: ti: Add and use PVU on K3-AM65 for DMA isolation Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250729122246.o7upnxvqnp7nltdo@harmonize \
    --to=nm@ti.com \
    --cc=baocheng.su@siemens.com \
    --cc=bhelgaas@google.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=diogo.ivo@siemens.com \
    --cc=helgaas@kernel.org \
    --cc=huaqian.li@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lpieralisi@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.