Received: from eggs.gnu.org ([208.118.235.92]:35781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwrLn-0001NM-9F for qemu-devel@nongnu.org; Sun, 20 Jan 2013 04:38:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwrLl-0007ai-St for qemu-devel@nongnu.org; Sun, 20 Jan 2013 04:38:03 -0500 Received: from cantor2.suse.de ([195.135.220.15]:45603 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwpVP-00022O-Ft for qemu-devel@nongnu.org; Sun, 20 Jan 2013 02:39:51 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 20 Jan 2013 08:39:35 +0100 Message-Id: <1358667575-2915-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH for-1.4] *-user: Don't reset X86CPU again List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , Igor Mammedov , Riku Voipio , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Peter Maydell Since commit 65dee38052597b6285eb208125369f01b29ba6c1 (target-i386: move cpu_reset and reset callback to cpu.c) the x86 CPU is reset through cpu_init() but was still reset immediately after in linux-user and bsd-user. Similarly it was reset again in linux-user after cpu_copy(), defeating its very purpose. Clean this up. Fixing the ppc and sparc cases of cpu_copy() and overhauling its implementation is left for another day. Cc: Igor Mammedov Signed-off-by: Andreas F=C3=A4rber Cc: Peter Maydell --- bsd-user/main.c | 2 +- linux-user/main.c | 2 +- linux-user/syscall.c | 2 +- 3 Dateien ge=C3=A4ndert, 3 Zeilen hinzugef=C3=BCgt(+), 3 Zeilen entfernt= (-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 1dc0330..ae24723 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -917,7 +917,7 @@ int main(int argc, char **argv) fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } -#if defined(TARGET_I386) || defined(TARGET_SPARC) || defined(TARGET_PPC) +#if defined(TARGET_SPARC) || defined(TARGET_PPC) cpu_reset(ENV_GET_CPU(env)); #endif thread_env =3D env; diff --git a/linux-user/main.c b/linux-user/main.c index 0181bc2..3df8aa2 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3540,7 +3540,7 @@ int main(int argc, char **argv, char **envp) fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } -#if defined(TARGET_I386) || defined(TARGET_SPARC) || defined(TARGET_PPC) +#if defined(TARGET_SPARC) || defined(TARGET_PPC) cpu_reset(ENV_GET_CPU(env)); #endif =20 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 693e66f..7be6144 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4361,7 +4361,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 =3D 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. */ --=20 1.7.10.4