lkml.org 
[lkml]   [2023]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 09/10] iommu: Make iommu_queue_iopf() more generic
From
On 8/25/23 4:17 PM, Tian, Kevin wrote:
>> +static void assert_no_pending_iopf(struct device *dev, ioasid_t pasid)
>> +{
>> + struct iommu_fault_param *iopf_param = dev->iommu-
>>> fault_param;
>> + struct iopf_fault *iopf;
>> +
>> + if (!iopf_param)
>> + return;
>> +
>> + mutex_lock(&iopf_param->lock);
>> + list_for_each_entry(iopf, &iopf_param->partial, list) {
>> + if (WARN_ON(iopf->fault.prm.pasid == pasid))
>> + break;
>> + }
> partial list is protected by dev_iommu lock.
>

Ah, do you mind elaborating a bit more? In my mind, partial list is
protected by dev_iommu->fault_param->lock.

Best regards,
baolu

\
 
 \ /
  Last update: 2023-08-26 10:07    [W:0.630 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site