Virtual RTE must restore status and branch to GELR without swapping SP and GOSP. An implicit swap undoes the explicit exit SPSWAP and resumes guest user code on the kernel stack.
Signed-off-by: Marco Liebel <[email protected]> --- target/hexagon/hexswi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/hexagon/hexswi.c b/target/hexagon/hexswi.c index f22d4a77516..acc68aa6c23 100644 --- a/target/hexagon/hexswi.c +++ b/target/hexagon/hexswi.c @@ -831,12 +831,6 @@ void hexagon_vmrte(CPUHexagonState *env) uint32_t old_ssr = env->t_sreg[HEX_SREG_SSR]; CPUState *cs = env_cpu(env); - if (GET_FIELD(GSR_UM, gsr)) { - uint32_t sp = env->gpr[HEX_REG_SP]; - - env->gpr[HEX_REG_SP] = env->greg[HEX_GREG_GOSP]; - env->greg[HEX_GREG_GOSP] = sp; - } SET_SYSTEM_FIELD(env, HEX_SREG_SSR, SSR_SS, GET_FIELD(GSR_SS, gsr)); SET_SYSTEM_FIELD(env, HEX_SREG_SSR, SSR_GM, -- 2.43.0
