Re: [PATCH v12 3/7] soc: ti: Add IOMMU-like PVU driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29.07.25 14:22, Nishanth Menon wrote:
> On 10:36-20250728, huaqian.li@xxxxxxxxxxx wrote:
>> From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
>>
>> 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@xxxxxxxxxxx>
>> Signed-off-by: Diogo Ivo <diogo.ivo@xxxxxxxxxxx>
>> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
>> Signed-off-by: Li Hua Qian <huaqian.li@xxxxxxxxxxx>
>> ---
>>  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.

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux