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

Yi Liu
2024-10-29T05:07:23Z

On 2024/10/28 16:23, Baolu Lu wrote:
> 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.
>

yes, something like the below patch but no flag to opt-out the PRQ drain.

https://lore.kernel.org/linux-iommu/20241018055402.23277-3-yi.l.liu@intel.com/

--
Regards,
Yi Liu