Re: [PATCH 2/6] iommu/vt-d: Move intel_drain_pasid_prq() into intel_pasid_tear_down_entry()

Yi Liu
2024-06-28T10:48:07Z

On 2024/6/28 17:42, Baolu Lu wrote:
> On 2024/6/28 16:55, Yi Liu wrote:
>> Draining PRQ is needed before repurposing a PASID. It makes sense to invoke
>> it in the intel_pasid_tear_down_entry().
>
> Can you please elaborate on the value of this merge?
>

The major reason is that the next patch would have multiple places that
need to destroy pasid entry and do prq drain. Wrap them would make life
easier I suppose.

> Draining the PRQ is necessary when PRI is enabled on the device, and a
> page table is about to be removed from the PASID. This might occur in
> conjunction with tearing down a PASID entry, but it seems they are two
> distinct actions.

Seems like mostly they have conjunction, while there is indeed one
exception in the intel_mm_release(). Given the above reason, do you have
any suggestion for it?

--
Regards,
Yi Liu