On 2/7/26 18:05, Richard Henderson wrote:
On 7/1/26 07:08, Philippe Mathieu-Daudé wrote:
Sorry for not being clear enough, I meant the TLB_MMIO & TLB_WATCHPOINT
checks just after:

+            /* The first active element crosses a page boundary. */
+            flags |= info.page[1].flags;
+            if (unlikely(flags & TLB_MMIO)) {
+                /* Some page is MMIO, see below. */
+                goto do_fault;
+            }
+            if (unlikely(flags & TLB_WATCHPOINT) &&
+                (cpu_watchpoint_address_matches
+                 (env_cpu(env), addr + mem_off, 1 << msz)
+                 & BP_MEM_READ)) {
+                /* Watchpoint hit, see below. */
+                goto do_fault;
+            }

We still have TLB_WATCHPOINT == 0 for user-only, so that won't actually fire.

We set TLB_MMIO to non-zero for user-only in 6d03226b422 so that we could force slow paths for plugins.  These days we should probably rearrange things so that TLB_FORCE_SLOW is used for that instead, and make TLB_MMIO be 0 again.

OK. I'm still stuck by this function complexity, and have the
feeling some of this should be handled at the lower mte_probe()
level (maybe extending it) up to allocation_tag_mem_probe() which
is clearer. But I have no expertise here so my comments might be
non-sense, no offense :)



r~



+            /* TODO: MTE check. */
+            /*
+             * Use the slow path for cross-page handling.
+             * This is RAM, without a watchpoint, and will not trap.
+             */
+            tlb_fn(env, vd, reg_off, addr + mem_off, retaddr);
+            goto second_page;
           }
       }




Reply via email to