Received: from eggs.gnu.org ([2001:4830:134:3::10]:36692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvGUF-0001Ka-8r for qemu-devel@nongnu.org; Fri, 05 Jul 2013 20:36:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvGUC-0002rA-CB for qemu-devel@nongnu.org; Fri, 05 Jul 2013 20:36:27 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42298 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvGUC-0002qf-6Y for qemu-devel@nongnu.org; Fri, 05 Jul 2013 20:36:24 -0400 From: Alexander Graf Date: Sat, 6 Jul 2013 02:36:12 +0200 Message-Id: <1373070978-11966-4-git-send-email-agraf@suse.de> In-Reply-To: <1373070978-11966-1-git-send-email-agraf@suse.de> References: <1373070978-11966-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 3/9] linux-user: Don't reset a new thread's CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Riku Voipio When we create a new thread, there is no reason to reset it. I'm fairly sure the code has mostly been left in there because nobody understood why it was there in the first place. Remove the reset. A new thread's kernel sided state should be identical to the old one's. Signed-off-by: Alexander Graf --- linux-user/syscall.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 433d3ba..d0408a2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4234,7 +4234,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, init_task_state(ts); /* we create a new CPU instance. */ new_env = cpu_copy(env); -#if defined(TARGET_I386) || defined(TARGET_SPARC) || defined(TARGET_PPC) +#if defined(TARGET_SPARC) || defined(TARGET_PPC) cpu_reset(ENV_GET_CPU(new_env)); #endif /* Init regs that differ from the parent. */ -- 1.6.0.2