[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM5PR11MB1435AE416B6167526CD64A6BC3610@DM5PR11MB1435.namprd11.prod.outlook.com>
Date: Tue, 14 Jul 2020 13:56:29 +0000
From: "Liu, Yi L" <yi.l.liu@...el.com>
To: "Yu, Fenghua" <fenghua.yu@...el.com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Joerg Roedel <joro@...tes.org>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
"Peter Zijlstra" <peterz@...radead.org>,
H Peter Anvin <hpa@...or.com>,
"David Woodhouse" <dwmw2@...radead.org>,
Lu Baolu <baolu.lu@...ux.intel.com>,
"Felix Kuehling" <Felix.Kuehling@....com>,
"Hansen, Dave" <dave.hansen@...el.com>,
"Luck, Tony" <tony.luck@...el.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
Christoph Hellwig <hch@...radead.org>,
"Raj, Ashok" <ashok.raj@...el.com>,
"Pan, Jacob jun" <jacob.jun.pan@...el.com>,
"Jiang, Dave" <dave.jiang@...el.com>,
"Mehta, Sohil" <sohil.mehta@...el.com>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
x86 <x86@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
amd-gfx <amd-gfx@...ts.freedesktop.org>
Subject: RE: [PATCH v6 01/12] iommu: Change type of pasid to u32
> From: Yu, Fenghua <fenghua.yu@...el.com>
> Sent: Tuesday, July 14, 2020 9:55 PM
> On Mon, Jul 13, 2020 at 07:45:49PM -0700, Liu, Yi L wrote:
> > > From: Fenghua Yu <fenghua.yu@...el.com>
> > > Sent: Tuesday, July 14, 2020 7:48 AM
> > >
> > > PASID is defined as a few different types in iommu including "int",
> > > "u32", and "unsigned int". To be consistent and to match with uapi
> > > definitions, define PASID and its variations (e.g. max PASID) as "u32".
> > > "u32" is also shorter and a little more explicit than "unsigned int".
> > >
> > > No PASID type change in uapi although it defines PASID as __u64 in
> > > some places.
> >
> > just out of curious, why not using ioasid_t? In Linux kernel, PASID is
> > managed by ioasid.
>
> ioasid_t is only used in limited underneath files (ioasid.c and ioasid.h).
> Instead of changing hundreds of places to use ioasid_t, it's better to keep ioasid_t
> only used in the files.
>
> And it's explict and matches with uapi to define PASID as u32. Changing to ioasid_t in
> so many files (amd, gpu, crypto, etc) may confuse upper users on "why ioasid_t".
>
> So we had better to explicitly define PASID as u32 and keep ioasid_t in the limited
> underneath files.
fair enough, thanks,
Regards,
Yi Liu
> Thanks.
>
> -Fenghua
Powered by blists - more mailing lists