Re: [RFC PATCH] iommu: arm-smmu-nvidia: Add default domain type implementation op

From: Thierry Reding
Date: Thu Jul 13 2023 - 09:37:46 EST


On Mon, Jul 10, 2023 at 03:40:28PM -0300, Jason Gunthorpe wrote:
> On Mon, Jul 10, 2023 at 11:22:52AM +0300, Stanimir Varbanov wrote:
> > Add def_domain_type implementation op and override default IOMMU
> > domain Kconfig option (CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y), which
> > could be enabled on some distros. The current quirk has been done
> > for Tegra234 machine, because I found the issue on it. The issue
> > itself appears on USB host controller which cannot be initialized
> > without IOMMU translation. Something more, we proved that IOMMU
> > translation is needed for display and GPU drivers as well.
>
> Generically, if you find HW combinations where certain end points
> cannot work with passthrough (which is really weird in the first
> place) it should be narrowly quirked - not just an entire platform.
>
> Also we don't really have a way to force non-passthrough, ARM32
> systems will always run in passthrough, for instance. Broadly the
> kernel expects it to work.

As I mentioned in my other, lengthy reply, passthrough is a very
undesirable configuration on more recent Tegra (Tegra186 and later at
least). Passthrough support (or more generally non-SMMU support) is in a
sad state at the moment because we rarely ever test it. I don't think it
can't be fixed, but it's going to take a bit of effort and is likely to
regress again in the future if we don't keep testing it continuously.

Thierry

Attachment: signature.asc
Description: PGP signature