On 4/18/23 13:30, Peter Maydell wrote:
On Tue, 18 Apr 2023 at 12:01, Richard Henderson
<richard.hender...@linaro.org> wrote:

On 4/14/23 18:04, Peter Maydell wrote:
+        /* Check if page table walk is to secure or non-secure PA space. */
+        ptw->out_secure = (is_secure
+                           && !(pte_secure
+                                ? env->cp15.vstcr_el2 & VSTCR_SW
+                                : env->cp15.vtcr_el2 & VTCR_NSW));
+    } else {
+        /* Regime is physical */
+        ptw->out_secure = pte_secure;

Is that last comment really correct?  I think it could still be stage1 of 2.

I borrowed the comment from earlier in the function, in the ptw->in_debug
branch of the code, which has the same

    if (regime_is_stage2(s2_mmu_idx)) {
       ...stuff...
    } else {
       /* Regime is physical */
    }

structure as this one does after this patch. If s2_mmu_idx isn't
a stage 2 index and it's not one of the Phys indexes, what is it ?

Oh, right.  Nevermind.

r~


Reply via email to