]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/io-pgtable-arm: Fix table descriptor paddr formatting
authorHector Martin <marcan@marcan.st>
Sat, 20 Nov 2021 03:13:43 +0000 (12:13 +0900)
committerJoerg Roedel <jroedel@suse.de>
Mon, 6 Dec 2021 12:03:01 +0000 (13:03 +0100)
commit7532257c5f995dd470c44c1c57bb13fba43f88cb
tree9a4e00b2d77398f8aa8964d0e5ff9d0b7a5811eb
parent0a0aefcf243e2a66e5fdfb0b679a34a03cc52b49
iommu/io-pgtable-arm: Fix table descriptor paddr formatting

Table descriptors were being installed without properly formatting the
address using paddr_to_iopte, which does not match up with the
iopte_deref in __arm_lpae_map. This is incorrect for the LPAE pte
format, as it does not handle the high bits properly.

This was found on Apple T6000 DARTs, which require a new pte format
(different shift); adding support for that to
paddr_to_iopte/iopte_to_paddr caused it to break badly, as even <48-bit
addresses would end up incorrect in that case.

Fixes: fce1ea03735b ("iommu/io-pgtable-arm: Support 52-bit physical address")
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
Link: https://lore.kernel.org/r/20211120031343.88034-1-marcan@marcan.st
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/io-pgtable-arm.c