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

"Deucher, Alexander" <[email protected]> Wed, 5 Aug 2026 17:22:22 +0000
Newsgroups dev.linux.lists.iommu,org.kernel.vger.linux-pci
Message-ID <BN9PR12MB5146934D584CF0A2A9DD8CFCF7D32@BN9PR12MB5146.namprd12.prod.outlook.com>
AMD General

> -----Original Message-----
> From: Hegde, Vasant <[email protected]>
> Sent: Wednesday, August 5, 2026 10:38 AM
> To: Jason Gunthorpe <[email protected]>
> Cc: Limonciello, Mario <[email protected]>; Kuehling, Felix
> <[email protected]>; Deucher, Alexander
> <[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
>
> Jason,
>
>
> On 8/5/2026 6:37 AM, Jason Gunthorpe wrote:
> > On Thu, Jul 30, 2026 at 04:56:37PM +0530, Vasant Hegde wrote:
> >
> >> Based on discussion so far in this thread and the link Mario shared earlier
> [1]:
> >>   - We still need identity mapping for APUs. I will fine tune the
> >> patch based on the discussion in this thread.
> >
> > IMHO if certain HW has broken support for PAGING (eg because it can't
> > handle the isochronous needs) then it should be quirked and blocked
> > properly.
> >
> > I thought the issue here was the PASID check forcing identity and
> > accidently capturing these raven chips too? It should just be moved
> > out to a normal quirk..
> >
> >>   - Its fine to drop SNP check
> >>   - I am still not sure its safe to drop SME check (CC_ATTR_MEM_ENCRYPT)
> >>     Because here were are putting all APUs in identity mode.
> >>     Commit ea68573d408f explicitly error out for RAVEN and some of
> >> the older APU platform didn't support SME. But not sure about newer
> ones.
> >
> > That's quite a hacky check to make in that commit..
> >
> >> So I am inclined to keep SME check for now. Once this patch
> >> stabilized we can revisit the SME check?
> >
> > The SME check makes no sense either, but if you want to stage things
> > I'm OK with it.
>
> Right. Eventually it should remove SME as well. But I am concerned about any
> regression. Also I don't have all these devices to test it. Hence for now I will
> limit to APUs, keep SME check and drop SNP check. Once it settle, we can go
> with next step.

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.

Alex