From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JpqCc-0001Bj-Jr for qemu-devel@nongnu.org; Sat, 26 Apr 2008 15:36:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JpqCa-00015U-4v for qemu-devel@nongnu.org; Sat, 26 Apr 2008 15:36:53 -0400 Received: from [199.232.76.173] (port=53907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JpqCZ-00015E-Sr for qemu-devel@nongnu.org; Sat, 26 Apr 2008 15:36:51 -0400 Received: from hs-out-0708.google.com ([64.233.178.241]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JpqCZ-00066S-G8 for qemu-devel@nongnu.org; Sat, 26 Apr 2008 15:36:51 -0400 Received: by hs-out-0708.google.com with SMTP id k27so2844275hsc.2 for ; Sat, 26 Apr 2008 12:36:48 -0700 (PDT) Message-ID: <4813844C.7070308@codemonkey.ws> Date: Sat, 26 Apr 2008 14:36:44 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [4261] Errors while registering ioports are not fatal (Glauber Costa). References: <200804262026.06396.paul@codesourcery.com> In-Reply-To: <200804262026.06396.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Paul Brook wrote: > On Saturday 26 April 2008, Andrzej Zaborowski wrote: > >> Revision: 4261 >> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4261 >> Author: balrog >> Date: 2008-04-26 16:04:29 +0000 (Sat, 26 Apr 2008) >> >> Log Message: >> ----------- >> Errors while registering ioports are not fatal (Glauber Costa). >> > > Why shouldn't they be fatal? How can this be anything other than a serious bug > in the device emulation? > I think the idea is that the device should fail to initialize rather the VM being destroyed. Consider the case of PCI hotplug. It's a recoverable error if register ioport fails during hot add. In general, it's better to avoid exit()'ing deep in the code and instead propagate errors. With that said, I don't think we should just eliminate the hw_error() call without going through and updating all the callers of register_ioport to handle that function failing. Regards, Anthony Liguori > Paul > > >