On 2/13/20 5:25 AM, Peter Maydell wrote: > On Thu, 13 Feb 2020 at 13:12, Peter Maydell <peter.mayd...@linaro.org> wrote: >> >> On Tue, 11 Feb 2020 at 19:42, Richard Henderson >> <richard.hender...@linaro.org> wrote: >>> >>> Select should always be 0 for a regime with one range. >>> >>> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> >> >> This change makes sense, and matches what aa32_va_parameters() does, >> but I think we need to update some of the callsites. >> >> (1) In get_phys_addr_lpae() we have the check: >> >> if (-top_bits != param.select || (param.select && !ttbr1_valid)) { >> >> where ttbr1_valid is the return value of (effectively) >> aarch64 ? regime_has_2_ranges() : (el != 2); >> but I think it's no longer possible to get here with param.select == 1 >> and !ttbr1_valid, so this becomes a dead check. > > ...or should the code instead be checking literal pointer bit 55 > against ttbr1_valid now ?
No, I think the first expression now covers everything, as you suggested in the first reply. r~