[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250729162338.so7evngndnysg4ui@cinnamon>
Date: Tue, 29 Jul 2025 11:23:38 -0500
From: Nishanth Menon <nm@...com>
To: Jan Kiszka <jan.kiszka@...mens.com>
CC: <huaqian.li@...mens.com>, <lkp@...el.com>, <baocheng.su@...mens.com>,
<bhelgaas@...gle.com>, <christophe.jaillet@...adoo.fr>,
<conor+dt@...nel.org>, <devicetree@...r.kernel.org>,
<diogo.ivo@...mens.com>, <helgaas@...nel.org>, <kristo@...nel.org>,
<krzk+dt@...nel.org>, <kw@...ux.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<linux-pci@...r.kernel.org>, <lpieralisi@...nel.org>,
<oe-kbuild-all@...ts.linux.dev>, <robh@...nel.org>,
<s-vadapalli@...com>, <ssantosh@...nel.org>, <vigneshr@...com>
Subject: Re: [PATCH v12 3/7] soc: ti: Add IOMMU-like PVU driver
On 18:11-20250729, Jan Kiszka wrote:
> On 29.07.25 14:22, Nishanth Menon wrote:
> > On 10:36-20250728, huaqian.li@...mens.com wrote:
> >> From: Jan Kiszka <jan.kiszka@...mens.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@...mens.com>
> >> Signed-off-by: Diogo Ivo <diogo.ivo@...mens.com>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
> >> Signed-off-by: Li Hua Qian <huaqian.li@...mens.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.
> >
> >
>
> PCI_KEYSTONE is bool and needs this (if enabled). So this won't be a
> module in practice.
>
Something of the form of
https://lore.kernel.org/all/20250307103128.3287497-1-s-vadapalli@ti.com/
will need to be done then.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
Powered by blists - more mailing lists