]> www.infradead.org Git - users/hch/misc.git/commit
FOLD: fix and cleanup IOVA state initialization
authorChristoph Hellwig <hch@lst.de>
Thu, 10 Oct 2024 04:48:17 +0000 (06:48 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 10 Oct 2024 05:43:54 +0000 (07:43 +0200)
commit8d0348f9f7554ad34ccfc4a753ea451307652fd5
treeb4c1d06328b24c18148ee4f20a99fd61c8a69de5
parenta9e21dbc422586f5f29f98bf0deda060bb8c6ff5
FOLD: fix and cleanup IOVA state initialization

Lift the basic global can use IOVA check from dma_set_iova_state to
dma_init_iova_state as it needs to nother state than the device.

Move the dynamic per-I/O exclusion to the link_range operation as a
single global check can't cover attibutes that might be different
for each mapping.

Note that right now no caller actually handles the -EREMOTEIO case.
For mlx5 vfio it should be impossible, but ODP will need handling
for this for the P2P case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/infiniband/core/umem_odp.c
drivers/iommu/dma-iommu.c
drivers/vfio/pci/mlx5/cmd.c
include/linux/dma-mapping.h
include/linux/iommu-dma.h
kernel/dma/mapping.c