Re: [PATCH v5 08/25] iommu: Reorganize iommu_get_default_domain_type() to respect def_domain_type()

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

 



On 2023/7/25 1:21, Jason Gunthorpe wrote:
Except for dart every driver returns 0 or IDENTITY from def_domain_type().

The drivers that return IDENTITY have some kind of good reason, typically
that quirky hardware really can't support anything other than IDENTITY.

Arrange things so that if the driver says it needs IDENTITY then
iommu_get_default_domain_type() either fails or returns IDENTITY.  It will
never reject the driver's override to IDENTITY.

The only real functional difference is that the PCI untrusted flag is now
ignored for quirky HW instead of overriding the IOMMU driver.

This makes the next patch cleaner that wants to force IDENTITY always for
ARM_IOMMU because there is no support for DMA.

Tested-by: Steven Price<steven.price@xxxxxxx>
Tested-by: Marek Szyprowski<m.szyprowski@xxxxxxxxxxx>
Tested-by: Nicolin Chen<nicolinc@xxxxxxxxxx>
Signed-off-by: Jason Gunthorpe<jgg@xxxxxxxxxx>
---
  drivers/iommu/iommu.c | 66 +++++++++++++++++++++----------------------
  1 file changed, 33 insertions(+), 33 deletions(-)

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux