arm,smmu: match start level of page table walk with P2M
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Fri, 2 Oct 2020 10:33:44 +0000 (13:33 +0300)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 2 Oct 2020 17:21:56 +0000 (10:21 -0700)
commit9ae1197582798b394d696cff94c4d742319bdbbf
tree50e61105f1db8098040070cbacaa86e612d4e243
parent59b27f360e3d9dc0378c1288e67a91fa41a77158
arm,smmu: match start level of page table walk with P2M

Don't hardcode the lookup start level of the page table walk to 1
and instead match the one used in P2M. This should fix scenarios
involving SMMU where the start level is different than 1.
In order for the SMMU driver to also compile on arm32 move the
P2M_ROOT_LEVEL in the p2m header file (while at it, for
consistency also P2M_ROOT_ORDER) and use the macro in the smmu
driver.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/p2m.c
xen/drivers/passthrough/arm/smmu.c
xen/include/asm-arm/p2m.h