From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JprEm-0007A9-KP for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:43:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JprEm-00079t-1W for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:43:12 -0400 Received: from [199.232.76.173] (port=60032 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JprEl-00079h-KB for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:43:11 -0400 Received: from wx-out-0506.google.com ([66.249.82.232]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JprEl-0000lL-BK for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:43:11 -0400 Received: by wx-out-0506.google.com with SMTP id h31so3565292wxd.4 for ; Sat, 26 Apr 2008 13:43:10 -0700 (PDT) Message-ID: <481393DB.2030101@codemonkey.ws> Date: Sat, 26 Apr 2008 15:43:07 -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: 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 Cc: Paul Brook andrzej zaborowski wrote: > On 26/04/2008, 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? >> > > This change is perhaps not useful, it would be useful with hot-plugged > / proxied pci devices. I think they are desirable features. But the > patchsets submitted turn out to depend on too much kvm code to ever > work alone so I might just as well revert :( > It's not at all kvm specific. Even if QEMU never merged PCI hotplug (although I see no reason why not to), it's the right direction to move toward. In the future, if we add configuration files to specific the hardware associated with a machine, you want to be able to gracefully detect when a configuration file results in IO port conflicts. Just exiting deep within register_ioport() is the wrong approach as a user will never know what the problem was. Being able to propagate the error gives the configuration parsing routines an opportunity to present a more human readable error like "cannot add device 'blah' because of conflict IO port range with device 'foo'". Regards, Anthony Liguori > You might not want qemu to quit a running session if it's possible to > continue running, even if there turns out to be a serious bug. > > Regards > > >