[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] target/hppa: Fix cpu_clone_regs
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 3/3] target/hppa: Fix cpu_clone_regs |
Date: |
Sat, 11 Mar 2017 13:42:32 +1000 |
By failing to return from the syscall in the child, the child
issues another clone syscall and hilarity ensues.
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/hppa/target_cpu.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h
index 1a5ceca..e50522e 100644
--- a/linux-user/hppa/target_cpu.h
+++ b/linux-user/hppa/target_cpu.h
@@ -24,7 +24,11 @@ static inline void cpu_clone_regs(CPUHPPAState *env,
target_ulong newsp)
if (newsp) {
env->gr[30] = newsp;
}
+ /* Indicate child in return value. */
env->gr[28] = 0;
+ /* Return from the syscall. */
+ env->iaoq_f = env->gr[31];
+ env->iaoq_b = env->gr[31] + 4;
}
static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls)
--
2.9.3