RE: [PATCH v2 07/12] iommu/vt-d: Put iopf enablement in domain attach path
From: Tian, Kevin
Date: Tue Feb 25 2025 - 03:02:59 EST
> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Sent: Monday, February 24, 2025 1:16 PM
>
> Update iopf enablement in the driver to use the new method, similar to
> the arm-smmu-v3 driver. Enable iopf support when any domain with an
> iopf_handler is attached, and disable it when the domain is removed.
>
> Place all the logic for controlling the PRI and iopf queue in the domain
> set/remove/replace paths. Keep track of the number of domains set to the
> device and PASIDs that require iopf. When the first domain requiring iopf
> is attached, add the device to the iopf queue and enable PRI. When the
> last domain is removed, remove it from the iopf queue and disable PRI.
>
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>