Hi Peter!

On 2/19/26 11:13, Peter Maydell wrote:
On Thu, 19 Feb 2026 at 14:02, Gustavo Romero <[email protected]> wrote:

get_phys_addr_disabled() is called from only one function,
get_phys_addr_nogpc(), and from two locations within it.

The first call to get_phys_addr_disabled() occurs when mmu_idx is one of
the following: ARMMMUIdx_Phys_S, ARMMMUIdx_Phys_NS, ARMMMUIdx_Phys_Root,
or ARMMMUIdx_Phys_Realm. So, handling ARMMMUIdx_Stage2 or
ARMMMUIdx_Stage2_S is not required in get_phys_addr_disabled() for this
case.

The second call to get_phys_addr_disabled(), with mmu_idx ==
ARMMMUIdx_Stage2 (or ARMMMUIdx_Stage2_S), only would occur if
regime_translation_disabled() returns
true for these mmu indexes. However, mmu_idx == ARMMMUIdx_Stage2 (or
ARMMMUIdx_Stage2_S) can only occur if get_phys_addr_twostage() was
called, since it's the only place where ptw->in_mmu_idx is set to
ARMMMUIdx_Stage2 (or ARMMMUIdx_Stage2_S) and that only happens if
regime_translation_disabled() returns false.

This is true, but only because we never call get_phys_addr_for_at()
with an mmu_idx argument of Stage2, right?

Correct, and that's a case that will never exist too afaics.


Cheers,
Gustavo

Reply via email to