From: Jason Gunthorpe <jgg@ziepe.ca>
To: Mario Limonciello <superm1@kernel.org>
Cc: Vasant Hegde <vasant.hegde@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Joerg Roedel <joro@8bytes.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
"open list:RADEON and AMDGPU DRM DRIVERS"
<amd-gfx@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:AMD IOMMU (AMD-VI)" <iommu@lists.linux.dev>
Subject: Re: [PATCH v4] iommu/amd: Make PerfOpt compulsory
Date: Fri, 2 Oct 2026 08:46:31 -0300 [thread overview]
Message-ID: <20261002114631.GA3481470@ziepe.ca> (raw)
In-Reply-To: <f790bd53-8610-4e8a-aa4c-1f346c0cbbe6@kernel.org>
On Thu, Oct 01, 2026 at 10:57:17PM -0500, Mario Limonciello 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@ziepe.ca>
> > > Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
> > > ---
> > > 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?
>
> 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.
Ideally you'd fix it by making the perfopt bit only set when an
identity domain is attached.
Though I'm not especially happy to see a driver that can't support at
least blocking, that's pretty broken in our model...
Definately don't show a warning, this is security stuff if the driver
can't do an operation then it must fail.
Jason
prev parent reply other threads:[~2026-10-02 11:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 18:24 Mario Limonciello (AMD)
2026-10-02 3:44 ` Vasant Hegde
2026-10-02 3:57 ` Mario Limonciello
2026-10-02 11:46 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261002114631.GA3481470@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=superm1@kernel.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®