Re: [PATCH v4 2/5] iommu/vt-d: Remove the pasid present check in prq_event_thread

Baolu Lu
2024-10-28T08:23:39Z

On 2024/10/28 15:50, Yi Liu wrote:
> On 2024/10/16 05:08, Joel Granados wrote:
>> From: Klaus Jensen <k.jensen@samsung.com>
>>
>> PASID is not strictly needed when handling a PRQ event; remove the check
>> for the pasid present bit in the request. This change was not included
>> in the creation of prq.c to emphasize the change in capability checks
>> when handing PRQ events.
>>
>> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
>> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
>> Signed-off-by: Joel Granados <joel.granados@kernel.org>
>
> looks like the PRQ draining is missed for the PRI usage. When a pasid
> entry is destroyed, it might need to add helper similar to the
> intel_drain_pasid_prq() to drain PRQ for the non-pasid usage.

Perhaps we can move intel_drain_pasid_prq() into
intel_pasid_tear_down_entry(), indicating that once a translation is
removed from the pasid and PRI is enabled on the device, the page
requests for the pasid should be flushed.

Thanks,
baolu