On 11/12/2026 5:20 PM, Anton Johansson wrote:
Currently hlx_ctx retains the pointer to the hlx_user_ctx of its parent.
Another way to go is similar to hvx_ctx, which in user-mode, is just the
struct itself rather than a pointer to the struct.

Fixes: cf0bfbc338eaeef2b ("target/hexagon: manage HLX contexts through CCR")
Signed-off-by: Anton Johansson <[email protected]>
Reviewed-by: Marco Liebel <[email protected]>
---
Reviewed-by: Brian Cain <[email protected]>

  linux-user/hexagon/target_cpu.h | 1 +
  1 file changed, 1 insertion(+)

diff --git a/linux-user/hexagon/target_cpu.h b/linux-user/hexagon/target_cpu.h
index ecb76e9268..6c36b7166f 100644
--- a/linux-user/hexagon/target_cpu.h
+++ b/linux-user/hexagon/target_cpu.h
@@ -25,6 +25,7 @@ static inline void cpu_clone_regs_child(CPUHexagonState *env,
          env->gpr[HEX_REG_SP] = newsp;
      }
      env->gpr[0] = 0;
+    env->hlx_ctx = &env->hlx_user_ctx;
  }
static inline void cpu_clone_regs_parent(CPUHexagonState *env, unsigned flags)

Reply via email to