Re: [PATCH 1/5] iommu: Add mm_get_pasid() helper function
From: Jason Gunthorpe
Date: Wed Aug 09 2023 - 08:31:21 EST
On Wed, Aug 09, 2023 at 09:47:15AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <jgg@xxxxxxxx>
> > Sent: Tuesday, August 8, 2023 11:02 PM
> >
> > On Tue, Aug 08, 2023 at 03:49:40PM +0800, Tina Zhang wrote:
> > > mm_get_pasid() is for getting mm pasid value.
> > >
> > > The motivation is to replace mm->pasid with an iommu private data
> > > structure that is introduced in a later patch.
> >
> > Maybe we should start out by calling it what it actually is:
> >
> > 'mm_get_enqcmd_pasid()'
> >
> > We can't actually have multiple SVA domains with different PASIDs
> > until the places wrongly calling this are removed :\
> >
>
> it's kind of egg-chicken problem. mm_get_pasid() is used by all SVA
> scenarios beyond enqcmd then calling it mm_get_enqcmd_pasid()
> also sounds weird for non-enqcmd case.
Well, those are wrong. We need to be fixing them not hide our eyes to
the wrongness.
Michael is cooking a fix for ARM, Tina should come with a fix for
Intel in this series.
Jason