[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] linux-user/sparc: Flush register windows before
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 4/4] linux-user/sparc: Flush register windows before clone |
Date: |
Mon, 30 Jul 2018 16:15:53 -0400 |
As seen as the very first instruction of sys_clone in the kernel.
Ideally this would be done in or before cpu_copy, and not with a
separate explicit test vs the syscall number, but this is a more
minimal solution.
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/sparc/cpu_loop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
index 91f714afc6..fe83f25686 100644
--- a/linux-user/sparc/cpu_loop.c
+++ b/linux-user/sparc/cpu_loop.c
@@ -169,6 +169,9 @@ void cpu_loop (CPUSPARCState *env)
case 0x110:
case 0x16d:
#endif
+ if (env->gregs[1] == TARGET_NR_clone) {
+ flush_windows(env);
+ }
ret = do_syscall (env, env->gregs[1],
env->regwptr[0], env->regwptr[1],
env->regwptr[2], env->regwptr[3],
--
2.17.1