On Mon, Sep 07, 2026 at 11:12:06PM -0500, Mario Limonciello wrote:
> +EXPORT_SYMBOL_GPL(amd_iommu_enable_perfopt);

Last time we hardwired the GPU and IOMMU drivers together it was a
huge mess to undo.

Why does the GPU driver have to request this? Why can't the iommu
driver know that this is a special device that can use this magic fast
path and then auto set it when identity is asked for?

How does the GPU driver even know it is magic special?

> +     /*
> +      * Restore ATS/PRI/PASID (and thus SVA) by re-homing the device onto its
> +      * identity domain with the flag cleared, so a later bind without 
> PerfOpt
> +      * sees a normally-capable device. See the locking note in
> +      * amd_iommu_enable_perfopt().
> +      */

And this is sort of a wrong thing in the driver, it shouldn't have ATS
turned on for identitiy mappings, and it certainly shouldn't have PRI
turned on until a PRI capable domain is attached.

Jason

Reply via email to