From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qj3IV-0003hQ-KV for qemu-devel@nongnu.org; Tue, 19 Jul 2011 01:56:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qj3IU-0006Iv-Jw for qemu-devel@nongnu.org; Tue, 19 Jul 2011 01:56:47 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:38921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qj3IU-0006Ij-Bn for qemu-devel@nongnu.org; Tue, 19 Jul 2011 01:56:46 -0400 Message-ID: <4E251C99.9000600@mail.berlios.de> Date: Tue, 19 Jul 2011 07:56:41 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1311020546-9769-1-git-send-email-weil@mail.berlios.de> <20110719023910.GC25737@valinux.co.jp> In-Reply-To: <20110719023910.GC25737@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-devel@nongnu.org Am 19.07.2011 04:39, schrieb Isaku Yamahata: > Thank you for addressing this. Similar patches were proposed and > weren't merged unfortunately. > > The reason why the qdev_register_reset() in vl.c is to keep the reset order. > The reset for main_system_bus shouldn't registered by qbus_create_inplace(). > But the check, bus != main_system_bus, doesn't work as intended because > main_system_bus is NULL in early qdev creation. > So there are possible ways for the fix. > > - Don't care the reset order > your patch + > remove "if (bus != main_system_bus)" in qbus_create_inplace() > > - keep the reset order > - instantiate main_system_bus early. > So the check, bus != main_system_bus in qbus_create_inplace(), will work. > or > - fix the check, bus != main_system_bus in qbus_create_inplace(), somehow > > thanks, Hi, my patch does not remove sysbus_get_default(), so the reset order is kept because main_system_bus is instantiated by this call. Cheers, Stefan