lkml.org 
[lkml]   [2019]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 04/11] iommu/vt-d: Replace Intel specific PASID allocator with IOASID
On Fri, 25 Oct 2019 13:47:25 +0800
Lu Baolu <baolu.lu@linux.intel.com> wrote:

> Hi,
>
> On 10/25/19 3:54 AM, Jacob Pan wrote:
> > Make use of generic IOASID code to manage PASID allocation,
> > free, and lookup. Replace Intel specific code.
> >
> > Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> > ---
> > drivers/iommu/intel-iommu.c | 12 ++++++------
> > drivers/iommu/intel-pasid.c | 36
> > ------------------------------------ drivers/iommu/intel-svm.c |
> > 39 +++++++++++++++++++++++---------------- 3 files changed, 29
> > insertions(+), 58 deletions(-)
>
> [--cut--]
>
> > @@ -458,10 +465,11 @@ int intel_svm_is_pasid_valid(struct device
> > *dev, int pasid) if (!iommu)
> > goto out;
> >
> > - svm = intel_pasid_lookup_id(pasid);
> > - if (!svm)
> > + svm = ioasid_find(NULL, pasid, NULL);
> > + if (IS_ERR(svm)) {
>
> Shall we check whether svm is NULL?
>
Missed this earlier, you are right we need to check for NULL.
Thanks,

> Others looks good to me.
>
> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
>
> Best regards,
> baolu

[Jacob Pan]

\
 
 \ /
  Last update: 2019-11-01 19:25    [W:0.128 / U:1.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site