From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JprAj-0005dA-IR for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:39:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JprAh-0005ct-1F for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:39:00 -0400 Received: from [199.232.76.173] (port=46957 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JprAg-0005cp-Ro for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:38:58 -0400 Received: from wx-out-0506.google.com ([66.249.82.236]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JprAe-0008T7-2b for qemu-devel@nongnu.org; Sat, 26 Apr 2008 16:38:56 -0400 Received: by wx-out-0506.google.com with SMTP id h31so3564479wxd.4 for ; Sat, 26 Apr 2008 13:38:55 -0700 (PDT) Message-ID: <481392DA.2090809@codemonkey.ws> Date: Sat, 26 Apr 2008 15:38:50 -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> <200804262108.50036.paul@codesourcery.com> In-Reply-To: <200804262108.50036.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: > >> 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 fail to see how hotplugging or proxing has anything to do with it. IO port > registration is not something that can reasonably fail. > > If the real problem is that we can't cope with multiple devices registering > the same IO port than you need to fix that. Blindly punting to the caller to > There is no fix for that. You can't have two devices that use the same IO port. > cope is IMHO not an acceptable solution, especially when none of the callers > check the return value. > IO port range conflicts can still happen even with PCI devices. Two PCI IDE controllers would conflict with each other for instance. It's much more likely with ISA of course but it's still possible. register_ioport really should have a return code and callers should actively be checking it. Regards, Anthony Liguori > Paul > > >