]> www.infradead.org Git - users/dwmw2/linux.git/commit
iommu/arm-smmu-v3: Add support for dirty tracking in domain alloc
authorJoao Martins <joao.m.martins@oracle.com>
Wed, 3 Jul 2024 10:16:03 +0000 (11:16 +0100)
committerWill Deacon <will@kernel.org>
Wed, 3 Jul 2024 14:45:47 +0000 (15:45 +0100)
commiteb054d67b21a53f6ccf3af49a62fb99397b48fc2
tree494814db7fe62ae87cc2d5fdc7d4e773926f0880
parent4fe88fd8b4aecb7f9680bf898811db76b94095a9
iommu/arm-smmu-v3: Add support for dirty tracking in domain alloc

This provides all the infrastructure to enable dirty tracking if the
hardware has the capability and domain alloc request for it.

Also, add a device_iommu_capable() check in iommufd core for
IOMMU_CAP_DIRTY_TRACKING before we request a user domain with dirty
tracking support.

Please note, we still report no support for IOMMU_CAP_DIRTY_TRACKING
as it will finally be enabled in a subsequent patch.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Link: https://lore.kernel.org/r/20240703101604.2576-5-shameerali.kolothum.thodi@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/iommufd/hw_pagetable.c
include/linux/io-pgtable.h