From patchwork Thu Jan 31 20:40:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 217254 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AB0E62C008D for ; Fri, 1 Feb 2013 07:41:47 +1100 (EST) Received: from localhost ([::1]:58551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U10x7-0002Ib-Lo for incoming@patchwork.ozlabs.org; Thu, 31 Jan 2013 15:41:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U10wz-0002IW-MV for qemu-devel@nongnu.org; Thu, 31 Jan 2013 15:41:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U10wy-0005b3-DL for qemu-devel@nongnu.org; Thu, 31 Jan 2013 15:41:37 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55097 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U10wy-0005T4-7S for qemu-devel@nongnu.org; Thu, 31 Jan 2013 15:41:36 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 743FBA50F4; Thu, 31 Jan 2013 21:40:54 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 31 Jan 2013 21:40:40 +0100 Message-Id: <1359664840-4160-1-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Blue Swirl , imammedo@redhat.com, Riku Voipio , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH for-1.4 v3] linux-user: bsd-user: Don't reset X86CPU twice X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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. Clean this up. Similarly it is also reset after cpu_copy(), but that's a bug of its own. Reviewed-by: Igor Mammedov Signed-off-by: Andreas Färber --- v2 -> v3: * Don't touch cpu_copy() at all, only fixing the double reset and not changing cpu_copy() behavior. v1 -> v2: * First move cpu_reset() into cpu_copy() before dropping x86 reset. bsd-user/main.c | 2 +- linux-user/main.c | 2 +- 2 Dateien geändert, 2 Zeilen hinzugefügt(+), 2 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 = 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