On 6/30/25 6:09 AM, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  target/arm/tcg/tlb_helper.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c
index 23c72a99f5c..df04ef351d1 100644
--- a/target/arm/tcg/tlb_helper.c
+++ b/target/arm/tcg/tlb_helper.c
@@ -349,7 +349,9 @@ bool arm_cpu_tlb_fill_align(CPUState *cs, CPUTLBEntryFull 
*out, vaddr address,
                                &res, fi)) {
          res.f.extra.arm.pte_attrs = res.cacheattrs.attrs;
          res.f.extra.arm.shareability = res.cacheattrs.shareability;
-        *out = res.f;
+        if (out) {
+            *out = res.f;
+        }
          return true;
      }
      if (probe) {

Would that be possible to provide more context about why it's needed?

The goal of tlb_fill_align is precisely to return a new CPUTLBEntryFull, while checking all the protection to access this page and generating a page fault if needed.

In case you just want to check if an address is valid, arm_cpu_get_phys_page_attrs_debug might be a better choice (checking for return value -1 in case of error).

Thanks,
Pierrick

Reply via email to