lkml.org 
[lkml]   [2022]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 11/12] iommu: Per-domain I/O page fault handling
From
On 2022/4/28 22:57, Jean-Philippe Brucker wrote:
> On Thu, Apr 21, 2022 at 01:21:20PM +0800, Lu Baolu wrote:
>> static void iopf_handle_group(struct work_struct *work)
>> {
>> struct iopf_group *group;
>> @@ -134,12 +78,23 @@ static void iopf_handle_group(struct work_struct *work)
>> group = container_of(work, struct iopf_group, work);
>>
>> list_for_each_entry_safe(iopf, next, &group->faults, list) {
>> + struct iommu_domain *domain;
>> +
>> + domain = iommu_get_domain_for_dev_pasid_async(group->dev,
>> + iopf->fault.prm.pasid);
> Reading the PCIe spec again (v6.0 10.4.1.1 PASID Usage), all faults within
> the group have the same PASID so we could move the domain fetch out of the
> loop. It does deviate from the old behavior, though, so we could change
> it later.

Perhaps we can add a pasid member in the struct iopf_group and do a
sanity check when a new iopf is added to the group? Here, we just fetch
the domain with group->pasid.

Best regards,
baolu

\
 
 \ /
  Last update: 2022-04-29 08:37    [W:0.070 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site