lkml.org 
[lkml]   [2018]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 07/23] iommu/vt-d: fix dev iotlb pfsid use
On Mon, 14 May 2018 09:52:04 +0800
Lu Baolu <baolu.lu@linux.intel.com> wrote:

> > diff --git a/drivers/iommu/intel-iommu.c
> > b/drivers/iommu/intel-iommu.c index 4623294..732a10f 100644
> > --- a/drivers/iommu/intel-iommu.c
> > +++ b/drivers/iommu/intel-iommu.c
> > @@ -1459,6 +1459,19 @@ static void iommu_enable_dev_iotlb(struct
> > device_domain_info *info) return;
> >
> > pdev = to_pci_dev(info->dev);
> > + /* For IOMMU that supports device IOTLB throttling (DIT),
> > we assign
> > + * PFSID to the invalidation desc of a VF such that IOMMU
> > HW can gauge
> > + * queue depth at PF level. If DIT is not set, PFSID will
> > be treated as
> > + * reserved, which should be set to 0.
> > + */
> > + if (!ecap_dit(info->iommu->ecap))
> > + info->pfsid = 0;
> > + else if (pdev && pdev->is_virtfn) {
> > + if (ecap_(info->iommu->ecap))
> > + dev_warn(&pdev->dev, "SRIOV VF device
> > IOTLB enabled without flow control\n");
>
> I can't understand these two lines.
>
> Isn't the condition always true? What does the error message mean?

you are right, there is no need to check ecap_dit again. thanks!

\
 
 \ /
  Last update: 2018-05-14 22:36    [W:0.083 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site