linux-stable/drivers/iommu
Jean-Philippe Brucker 2128318c91 iommu/virtio: Return size mapped for a detached domain
[ Upstream commit 7061b6af34 ]

When map() is called on a detached domain, the domain does not exist in
the device so we do not send a MAP request, but we do update the
internal mapping tree, to be replayed on the next attach. Since this
constitutes a successful iommu_map() call, return *mapped in this case
too.

Fixes: 7e62edd7a3 ("iommu/virtio: Add map/unmap_pages() callbacks implementation")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230515113946.1017624-3-jean-philippe@linaro.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:20 +02:00
..
amd mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
arm
intel iommu/vt-d: Allow zero SAGAW if second-stage not supported 2023-04-06 12:10:49 +02:00
apple-dart.c iommu/dart: Fix apple_dart_device_group for PCI groups 2023-03-10 09:33:36 +01:00
dma-iommu.c
dma-iommu.h
exynos-iommu.c
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
hyperv-iommu.c
io-pgfault.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
io-pgtable-arm-v7s.c
io-pgtable-arm.c
io-pgtable-arm.h
io-pgtable-dart.c
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sva-lib.c
iommu-sva-lib.h
iommu-sysfs.c
iommu-traces.c
iommu.c iommu/amd: Set page size bitmap during V2 domain allocation 2023-05-11 23:03:34 +09:00
iova.c
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
Kconfig
Makefile
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu/mediatek: Flush IOTLB completely only if domain has been attached 2023-06-09 10:34:04 +02:00
mtk_iommu_v1.c
of_iommu.c
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu/rockchip: Fix unwind goto issue 2023-06-09 10:33:59 +02:00
s390-iommu.c
sprd-iommu.c
sun50i-iommu.c
tegra-gart.c
tegra-smmu.c
virtio-iommu.c iommu/virtio: Return size mapped for a detached domain 2023-07-19 16:21:20 +02:00