Re: [PATCH v4] iommu/amd: Make PerfOpt compulsory

From: Mario Limonciello

Date: Thu Oct 01 2026 - 23:57:27 EST




On 10/1/26 10:44 PM, Vasant Hegde wrote:


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.

Suggested-by: Jason Gunthorpe <jgg@xxxxxxxx>
Signed-off-by: Mario Limonciello (AMD) <superm1@xxxxxxxxxx>
---
v4:
* Disable PASID for PerfOpt devices
* Don't allow attaching a blocked domain

This will block attaching device to guest via vfio-pci. Is that fine?

-Vasant


Right - The thing is from that experiment on v3, putting it in blocked domain does nothing while PerfOpt is enabled.

I figured the user should be aware; so I was between blocking attaching a blocked domain or showing a warning.