RE: [PATCH v3 3/5] iommu/vt-d: Setup scalable mode context entry in probe path

From: Tian, Kevin
Date: Mon Mar 04 2024 - 20:50:23 EST


> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Sent: Tuesday, March 5, 2024 9:33 AM
>
> In contrast to legacy mode, the DMA translation table is configured in
> the PASID table entry instead of the context entry for scalable mode.
> For this reason, it is more appropriate to set up the scalable mode
> context entry in the device_probe callback and direct it to the
> appropriate PASID table.
>
> The iommu domain attach/detach operations only affect the PASID table
> entry. Therefore, there is no need to modify the context entry when
> configuring the translation type and page table.
>
> The only exception is the kdump case, where context entry setup is
> postponed until the device driver invokes the first DMA interface.
>
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

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