Re: [PATCH v2] iommu/amd: serialize sequence allocation under concurrent TLB invalidations
From: Vasant Hegde
Date: Tue Feb 03 2026 - 01:26:44 EST
On 1/22/2026 9:00 PM, Ankit Soni wrote:
> With concurrent TLB invalidations, completion wait randomly gets timed out
> because cmd_sem_val was incremented outside the IOMMU spinlock, allowing
> CMD_COMPL_WAIT commands to be queued out of sequence and breaking the
> ordering assumption in wait_on_sem().
> Move the cmd_sem_val increment under iommu->lock so completion sequence
> allocation is serialized with command queuing.
> And remove the unnecessary return.
>
> Fixes: d2a0cac10597 ("iommu/amd: move wait_on_sem() out of spinlock")
>
> Tested-by: Srikanth Aithal <sraithal@xxxxxxx>
> Reported-by: Srikanth Aithal <sraithal@xxxxxxx>
> Signed-off-by: Ankit Soni <Ankit.Soni@xxxxxxx>
Reviewed-by: Vasant Hegde <vasant.hegde@xxxxxxx>
@Joerg, Can you please pick this one? It fixes regression in iommu/next branch.
-Vasant