From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBOa3-0004uk-1C for qemu-devel@nongnu.org; Tue, 11 Sep 2012 07:24:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBOZy-0007iX-Oz for qemu-devel@nongnu.org; Tue, 11 Sep 2012 07:24:34 -0400 Received: from smtp.citrix.com ([66.165.176.89]:64103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBOZy-0007iO-Jg for qemu-devel@nongnu.org; Tue, 11 Sep 2012 07:24:30 -0400 Message-ID: <504F2009.9040900@citrix.com> Date: Tue, 11 Sep 2012 12:27:05 +0100 From: Julien Grall MIME-Version: 1.0 References: <504F0131.6090501@redhat.com> <504F037D.7020207@redhat.com> In-Reply-To: <504F037D.7020207@redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Jan Kiszka , Stefano Stabellini , "qemu-devel@nongnu.org" , "afaerber@suse.de" , "kraxel@redhat.com" On 09/11/2012 10:25 AM, Avi Kivity wrote: > On 09/11/2012 12:15 PM, Avi Kivity wrote: > >> On 09/04/2012 06:13 PM, Julien Grall wrote: >> >>> This is the nineth version of patch series about ioport registration. >>> >>> Some part of QEMU still use register_ioport* functions to register ioport. >>> These functions doesn't allow to use Memory Listener on it. >>> >> Thanks, applied all (w/ updated patch 4), will push shortly. >> >> >> > Aborts with the command line > > qemu-system-x86_64 -device isa-debugcon,iobase=0x402,chardev=stdio -chardev stdio,id=stdio > > > I have bisected and found the problem with bochs_bios_init in hw/pc.c. Bosch already register the iport 0x402. I'm not sure that it's a bug. In fact register_ioport_read/write check if the current ioport is used with the opaque variable. Before my patch, bochs_bios_init registered it's ioport with opaque NULL, so if someone (like debugcon) wants to use the ioport there is no problem. But now, I used portio_list_init to register bochs ioport, so the opaque is not NULL. I don't really know how to resolve this problem. Perhaps we could just improve the debug message. -- Julien Grall