Commit 7281c9b0a2 for qemu.org

commit 7281c9b0a23ead380d6df29ad74ded3cd518f583
Author: Anton Johansson <anjo@rev.ng>
Date:   Fri Nov 13 00:20:32 2026 +0100

    linux-user/hexagon: Reset hlx_ctx pointer on cpu clone

    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>
    Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
    Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>

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)