summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXiong Weimin <xiongweimin@kylinos.cn>2026-06-26 10:05:45 +0800
committerMichael S. Tsirkin <mst@redhat.com>2026-08-19 06:38:45 -0400
commit7b411448c668bfab0d0e572cee5a592cea396ce7 (patch)
tree8dac5fa269fbe8bcc2f3d87d7ec5ea57ca90c31d /include
parent135f0abe31397694c06f5e28bf93d5e123756abc (diff)
downloadlinux-7b411448c668bfab0d0e572cee5a592cea396ce7.tar.gz
linux-7b411448c668bfab0d0e572cee5a592cea396ce7.zip
vdpa_sim: hold iommu_lock across dma_unmap passthrough transition
vdpasim_dma_map() updates the IOTLB and the passthrough (iommu_pt) state under iommu_lock. vdpasim_dma_unmap() clears iommu_pt and resets the IOTLB before taking iommu_lock, then deletes the mapping while holding the lock. A concurrent dma_map(), dma_unmap(), or reset path that also touches the same address space can therefore observe or modify the IOTLB and iommu_pt state without consistent locking. Perform the passthrough transition and range deletion under the same iommu_lock scope, matching dma_map(). Tested-on: openEuler VM (6.16.8, /usr/src/linux-6.16.8) Tested-by: Xiong Weimin <xiongweimin@kylinos.cn> Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260626020545.607600-3-15927021679@163.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions