Re: [PATCH v5] iommu/amd: Enable PerfOpt automatically for integrated GPUs

From: Vasant Hegde

Date: Thu Nov 05 2026 - 05:35:47 EST


Alex,


On 11/2/2026 8:26 PM, Vasant Hegde wrote:
>
>
> On 10/23/2026 2:16 AM, Mario Limonciello (AMD) wrote:
>> PerfOpt is usable by integrated GPUs in identity mode. Enable it from
>> the IOMMU driver's domain attachment paths instead of requiring an
>> amdgpu policy knob and exported enable/disable interfaces.
>>
>> Mark supported integrated GPUs as PerfOpt-eligible when selecting their
>> default identity domain. Skip GCR3 setup and ATS/PRI/PASID enablement for
>> these identity attachments, then enable PerfOpt after installing the DTE.
>> Clear PerfOpt before attaching an eligible GPU to a translated or blocked
>> domain, including unmanaged domains used by VFIO. Propagate failures to
>> clear bypass, but keep a completed identity attachment successful if the
>> optional PerfOpt enable fails.
>>
>> Clear inherited PerfOpt state during initialization, including when a crash
>> kernel reuses device tables. Read feature support directly from hardware
>> because cached features may not be available yet, and stop initialization
>> if the initial clear fails.
>>
>> Each IOMMU has at most one PerfOpt-eligible GPU, so track activation with a
>> boolean under the IOMMU lock. Preserve this state while clearing hardware
>> at suspend and shutdown, and restore the bit on resume only where it was
>> active. Do not enable PerfOpt unconditionally during early IOMMU
>> initialization.
>>
>> Remove the amdgpu parameter, driver callbacks, and exported interfaces.
>> Translated attachments retain their normal device capability setup.
>>
>> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxx>
>> Signed-off-by: Mario Limonciello (AMD) <superm1@xxxxxxxxxx>
>
> Looks good. Queued for rc.

Can you ack this patch so that we can pick it through IOMMU tree?

-Vasant