From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnzMq-0006Ia-7m for qemu-devel@nongnu.org; Mon, 01 Aug 2011 16:45:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnzMo-0007W4-LV for qemu-devel@nongnu.org; Mon, 01 Aug 2011 16:45:40 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:39917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnzMo-0007Vw-F9 for qemu-devel@nongnu.org; Mon, 01 Aug 2011 16:45:38 -0400 Message-ID: <4E37106D.4090403@mail.berlios.de> Date: Mon, 01 Aug 2011 22:45:33 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1311020546-9769-1-git-send-email-weil@mail.berlios.de> <20110719023910.GC25737@valinux.co.jp> <4E251C99.9000600@mail.berlios.de> <20110719072212.GA29608@valinux.co.jp> <20110801110028.GL31494@valinux.co.jp> In-Reply-To: <20110801110028.GL31494@valinux.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Fix duplicate device reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: QEMU Developers Am 01.08.2011 13:00, schrieb Isaku Yamahata: > > Hi, here is the patch. Can you please give it a try? > > From 41039df3174fa46477c4faf93d13eab360dccc22 Mon Sep 17 00:00:00 2001 > Message-Id: > <41039df3174fa46477c4faf93d13eab360dccc22.1312196365.git.yamahata@valinux.co.jp> > From: Isaku Yamahata > Date: Mon, 1 Aug 2011 19:56:42 +0900 > Subject: [PATCH] qdev: Fix duplicate reset > > qbus_reset_all_fn was registered twice, so a lot of device reset > functions were also called twice when QEMU started. > Which was introduced by 80376c3fc2c38fdd45354e4b0eb45031f35587ed > This patch fixes it by making the main_sytem_bus creation not register main_system_bus > reset handler. > > Cc: Stefan Weil > Signed-off-by: Isaku Yamahata > --- > hw/qdev.c | 14 ++++++++++++-- > 1 files changed, 12 insertions(+), 2 deletions(-) Thanks. I tested your patch with i386-softmmu (bios only) and with mipsel-softmmu (debian boot / malta). All registered reset functions were called only once, and qbus_reset_all_fn was the last one called. I noticed that there are two functions named piix3_reset. One might be renamed to piix3_ide_reset, but this is not related to your patch. There are also two functions piix4_reset. Tested-by: Stefan Weil