RE: [PATCH 2/2] iommu/amd: Force identity mode for selected GPUs only

"Deucher, Alexander" <[email protected]>
Newsgroups org.kernel.vger.linux-pci,dev.linux.lists.iommu
Message-ID <BN9PR12MB5146253D30587DC820486F4FF7DC2@BN9PR12MB5146.namprd12.prod.outlook.com>
Public

> -----Original Message-----
> From: Jason Gunthorpe <[email protected]>
> Sent: Wednesday, August 12, 2026 4:58 PM
> To: Deucher, Alexander <[email protected]>
> Cc: Hegde, Vasant <[email protected]>; Limonciello, Mario
> <[email protected]>; Kuehling, Felix <[email protected]>;
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Suthikulpanit, Suravee
> <[email protected]>; [email protected]; Longia,
> Amandeep Kaur <[email protected]>
> Subject: Re: [PATCH 2/2] iommu/amd: Force identity mode for selected GPUs
> only
>
> On Wed, Aug 12, 2026 at 08:29:24PM +0000, Deucher, Alexander wrote:
> > AMD General
> >
> > > -----Original Message-----
> > > From: Jason Gunthorpe <[email protected]>
> > > Sent: Wednesday, August 5, 2026 3:11 PM
> > > To: Deucher, Alexander <[email protected]>
> > > Cc: Hegde, Vasant <[email protected]>; Limonciello, Mario
> > > <[email protected]>; Kuehling, Felix
> > > <[email protected]>; [email protected]; [email protected];
> > > [email protected]; [email protected]; [email protected];
> > > Suthikulpanit, Suravee <[email protected]>;
> > > [email protected]; Longia, Amandeep Kaur
> > > <[email protected]>
> > > Subject: Re: [PATCH 2/2] iommu/amd: Force identity mode for selected
> > > GPUs only
> > >
> > > On Wed, Aug 05, 2026 at 06:12:05PM +0000, Deucher, Alexander wrote:
> > >
> > > > > On Wed, Aug 05, 2026 at 05:22:22PM +0000, Deucher, Alexander
> wrote:
> > > > >
> > > > > > IIRC, they supported SME, but it wasn't usable due to other
> > > > > > limitations (e.g., the requirement for identity mappings due
> > > > > > to the display hw bug and the latency impact of encryption for
> > > > > > displays in system memory).  Do you could effectively pick
> > > > > > either SME or
> > > displays.
> > > > >
> > > > > IMHO the GPU driver should fail if it cannot work because it
> > > > > can't reach the IOVA space requried for SME ...
> > > > >
> > > > > I don't think this should be a iommu problem to deal with
> > > >
> > > > That means no display for the user which is a not a good user
> > > > experience. Most users of systems with integrated graphics would
> > > > probably prefer displays over SME.
> > >
> > > You said IOVA translation doesn't work at all on these devices due
> > > to a bug, so what is the iommu even supposed to do? It can't select
> > > identity because the device doesn't work that way and it can't
> > > select paging because it doesn't work that way either.
> > >
> > > Or are you saying paging sort of works enough to do something half-
> busted?
> >
> > IOVAs worked fine for everything on the GPU (gfx, video enc/dec,
> > etc.) except for displays.  You could avoid the problem by limiting
> > displays to carve out, but many of these platforms shipped with so
> > little carve out that that it wasn't feasible to use carve out for
> > displays beyond the UEFI splash screen.  That's what we did on Linux
> > initially until lots of OEMs started shipping platforms with minimal
> > carve out and no way to change it.
>
> Sure, but the end result is the GPU and SME are inherently incompatible, we
> can't really fix it.
>
> What's wrong with blowing up at boot with a clear message that Linux must
> have SME disabled on this HW printed to the UEFI console?

It's not very user friendly, plus it would break working systems.  I'm not sure the average user would know what to do.  You aren't likely to want SME in the first place on one of these laptops.  Why not flip the logic and print a clear message that if the user wants SME they have to explicitly enable it via the kernel command line.

Alex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.