diff mbox series

[v2,4/4] linux-user/hexagon: Reset hlx_ctx pointer on cpu clone

Message ID 20261105114633.597-5-anjo@rev.ng
State New
Headers show
Series target/hexagon: Misc HLX fixes | expand

Commit Message

Anton Johansson Nov. 5, 2026, 11:46 a.m. UTC
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 <anjo@rev.ng>
Reviewed-by: Marco Liebel <marco.liebel@oss.qualcomm.com>
---
 linux-user/hexagon/target_cpu.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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)