target/arm: Add ptw_idx to S1Translate
commit48da29e485af5c92e284fbb6ef279b2a98eea7c4
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 24 Oct 2022 05:18:39 +0000 (24 15:18 +1000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 27 Oct 2022 09:27:23 +0000 (27 10:27 +0100)
tree8750a1481bf34ffa986e9a3feb9abcd97536ed2a
parentedc05dd43ade287e735f1d8c972562dbdd12a378
target/arm: Add ptw_idx to S1Translate

Hoist the computation of the mmu_idx for the ptw up to
get_phys_addr_with_struct and get_phys_addr_twostage.
This removes the duplicate check for stage2 disabled
from the middle of the walk, performing it only once.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20221024051851.3074715-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/ptw.c