From patchwork Mon Jul 18 20:22:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 105355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 33081B6F69 for ; Tue, 19 Jul 2011 06:25:01 +1000 (EST) Received: from localhost ([::1]:36455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiuN7-0008QJ-8x for incoming@patchwork.ozlabs.org; Mon, 18 Jul 2011 16:24:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]:59559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiuKu-0008Pd-K1 for qemu-devel@nongnu.org; Mon, 18 Jul 2011 16:22:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QiuKq-0001Da-NB for qemu-devel@nongnu.org; Mon, 18 Jul 2011 16:22:40 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:43773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiuKq-0001DN-Ia for qemu-devel@nongnu.org; Mon, 18 Jul 2011 16:22:36 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id 13B587282F7A; Mon, 18 Jul 2011 22:22:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bze3aG8O0FNh; Mon, 18 Jul 2011 22:22:29 +0200 (CEST) Received: by v220110690675601.yourvserver.net (Postfix, from userid 1000) id 6B93C7282F82; Mon, 18 Jul 2011 22:22:29 +0200 (CEST) From: Stefan Weil To: Isaku Yamahata Date: Mon, 18 Jul 2011 22:22:26 +0200 Message-Id: <1311020546-9769-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 78.47.199.172 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] Fix duplicate device reset 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 qbus_reset_all_fn was registered twice, so a lot of device reset functions were also called twice when QEMU started. It is sufficient to call sysbus_get_default() which will register qbus_reset_all_fn. Signed-off-by: Stefan Weil --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index fcd7395..fb2f6db 100644 --- a/vl.c +++ b/vl.c @@ -3301,7 +3301,7 @@ int main(int argc, char **argv, char **envp) /* TODO: once all bus devices are qdevified, this should be done * when bus is created by qdev.c */ - qemu_register_reset(qbus_reset_all_fn, sysbus_get_default()); + sysbus_get_default(); qemu_run_machine_init_done_notifiers(); qemu_system_reset(VMRESET_SILENT);