Mario,

On 10/1/2026 11:54 PM, Mario Limonciello (AMD) wrote:
> PerfOpt is only a feature usable by integrated GPUs and only in identity
> mode.  Instead of leaving a policy knob in amdgpu, just turn it on when
> an integrated GPU is in identity.
> 
> PerfOpt locks the GPU into identity mode where the DTE is ignored, so mark
> it require_direct (blocks VFIO/iommufd claims) and disable PASID (no GCR3
> table in the fast path).
> 
> This drops quite a bit of compatibility glue.  There was a refcounting
> system, exported symbols, and device attach/detach logic.  By just setting
> it immediately it's a lot more straightforward.

I believe its good to get this merged in this cycle itself so that we can get
rid of the command line options introduced earlier.

I have looked into this patch again. How about somthing like below:

  - Do not call amd_iommu_perfopt_set() in early_enable_iommu() path
    Because it enables feature on all IOMMUs even though it may not have iGPUs

  - amd_iommu_def_domain_type:
    mark device PerfOpt-eligible
    select identity

  - identity attach:
    Enable IOMMU perfOpt feature

  - DMA / Blocked domain
    Disable IOMMU perfOpt feature

  - resume:
    restore hardware bit


-Vasant

Reply via email to