[Devel] [PATCH hci-8.1 2/3] ms/iommu/amd: serialize sequence allocation under concurrent TLB invalidations

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Nov 10 22:22:26 MSK 2026


> From: Ankit Soni <Ankit.Soni at amd.com>
> 
> 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 at amd.com>
> Reported-by: Srikanth Aithal <sraithal at amd.com>
> Signed-off-by: Ankit Soni <Ankit.Soni at amd.com>
> Reviewed-by: Vasant Hegde <vasant.hegde at amd.com>
> Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
> (cherry picked from commit 9e249c48412828e807afddc21527eb734dc9bd3d)
> 
> Context adjusted: vz10 does not have cmd_sem_paddr in struct amd_iommu.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-154424
> Feature: fix ms/iommu
> 
> Signed-off-by: Denis V. Lunev <den at openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261110191836.3000352-1-den@openvz.org?part=2




More information about the Devel mailing list