From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51969 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTO89-0004vo-Mo for qemu-devel@nongnu.org; Thu, 16 Dec 2010 19:25:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTO88-00010R-6N for qemu-devel@nongnu.org; Thu, 16 Dec 2010 19:25:05 -0500 Received: from e9.ny.us.ibm.com ([32.97.182.139]:36339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTO88-0000yi-3t for qemu-devel@nongnu.org; Thu, 16 Dec 2010 19:25:04 -0500 Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e9.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oBH01ox5014899 for ; Thu, 16 Dec 2010 19:01:50 -0500 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 7E72A4DE803B for ; Thu, 16 Dec 2010 19:22:36 -0500 (EST) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oBH0OjEw396346 for ; Thu, 16 Dec 2010 19:24:45 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oBH0OjKC002001 for ; Thu, 16 Dec 2010 22:24:45 -0200 Message-ID: <4D0AADCB.4010301@linux.vnet.ibm.com> Date: Thu, 16 Dec 2010 18:24:43 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 2/6] qdev: reset qdev along with qdev tree References: <32f3c5f99628967649cf6987dbf9c4c2c4baa568.1290160397.git.yamahata@valinux.co.jp> <4D0A6909.2090404@mail.berlios.de> <20101216234804.GG3878@redhat.com> In-Reply-To: <20101216234804.GG3878@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Anthony Liguori , qemu-devel@nongnu.org, Aurelien Jarno , Isaku Yamahata On 12/16/2010 05:48 PM, Michael S. Tsirkin wrote: > On Thu, Dec 16, 2010 at 08:31:21PM +0100, Stefan Weil wrote: > >> Am 19.11.2010 10:55, schrieb Isaku Yamahata: >> >>> From: Anthony Liguori >>> >>> This patch changes the reset handling so that qdev has no knowledge of the >>> global system reset. Instead, a new bus/device level function is >>> introduced >>> that allows all devices/buses on the bus/device to be reset using a depth >>> first transversal. >>> >>> N.B. we have to expose the implicit system bus because we have >>> various hacks >>> that result in an implicit system bus existing. Instead, we ought >>> to have an >>> explicitly created system bus that we can trigger reset from. >>> That's a topic >>> for a future patch though. >>> >>> Signed-off-by: Anthony Liguori >>> Signed-off-by: Isaku Yamahata >>> --- >>> hw/qdev.c | 28 +++++++++++++++++++--------- >>> hw/qdev.h | 4 ++++ >>> vl.c | 1 + >>> 3 files changed, 24 insertions(+), 9 deletions(-) >>> >> >> This patch (which is included in qemu master now) introduces >> two regressions at least for MIPS system emulation: >> >> The emulated MIPS machines mipssim and malta no longer work >> because qemu tries a null pointer read access (caused by >> sysbus_get_default returning NULL). Just run any of these >> machines (big or little endian, 32 or 64 bit) with any mips >> kernel or bios to get this crash. >> >> This first regression can be fixed with a patch which I have >> sent to qemu-devel. >> >> The second regression also occurs with MIPS malta. >> Networking no longer works with the default pcnet nic. >> >> This is caused because the reset function for pcnet is no >> longer called during system boot. The result in an invalid >> mac address (all zero) and a non-working nic. >> >> For this second regression I still have no simple solution. >> Of course mips_malta.c should be converted to qdev which >> would fix both problems (but only for malta system emulation). >> >> Maybe other systems / devices don't get their reset functions >> called during system boot, too. >> >> Stefan Weil >> > Ugh, I keep forgetting about the non-qdev systems. > Maybe it's a good way to finally make everyone to convert? If a system > maintainer can't be bothered to convert to qdev we can declare the > system unsupported :) > Honestly, I think that's a fair thing to do. Regards, Anthony Liguori