RE: [PATCH v3 2/7] iommu/vt-d: Add device_block_translation() helper

From: Tian, Kevin
Date: Tue Nov 15 2022 - 22:50:14 EST


> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Sent: Monday, November 14, 2022 9:41 AM
>
> If domain attaching to device fails, the IOMMU driver should bring the
> device to blocking DMA state. The upper layer is expected to recover it
> by attaching a new domain. Use device_block_translation() in the error
> path of dev_attach to make the behavior specific.
>
> The difference between device_block_translation() and the previous
> dmar_remove_one_dev_info() is that, in the scalable mode, it is the
> RID2PASID entry instead of context entry being cleared. As a result,
> enabling PCI capabilities is moved up.
>
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>