Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOYLM-0003uD-69 for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:09:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOYLK-0003tp-Kf for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:09:39 -0500 Received: from [199.232.76.173] (port=33711 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOYLK-0003tm-EB for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:09:38 -0500 Received: from hall.aurel32.net ([88.191.82.174]:47765) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LOYLK-00069o-1C for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:09:38 -0500 Date: Sun, 18 Jan 2009 15:09:33 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [6352] Fix character devices after DisplayState refactoring Message-ID: <20090118140933.GA3461@hall.aurel32.net> References: <4972578E.5000705@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <4972578E.5000705@mail.berlios.de> Sender: Aurelien Jarno 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 On Sat, Jan 17, 2009 at 11:11:26PM +0100, Stefan Weil wrote: > Anthony Liguori schrieb: > > Revision: 6352 > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6352 > > Author: aliguori > > Date: 2009-01-16 20:23:27 +0000 (Fri, 16 Jan 2009) > > > > Log Message: > > ----------- > > Fix character devices after DisplayState refactoring > > > > The DisplayState refactoring changed the machine init function to create a > > DisplayState for each VGA device instead of being passed an existing > > DisplayState. This change is critical to enable multiple graphics device > > support. > > > > Unfortunately, the serial/parallel/console code is structured today to run > > before machine init to fill out the CharDriverState table which the > > machine > > init function uses to determine whether to create the required devices. > > > > Since a 'vc' is a type of CharDriverState, the CharDriverState code > > requires > > that a DisplayState exist before it runs creating a circular dependency. > > > > To fix this, this splits the creation of the initial CharDriverState from > > the initialization of the text console. We can then in a second step > > associate > > a DisplayState with all TextConsoles. This allows us to create the > > CharDriverState's first, machine init, then associate the TextConsoles > > with > > a DisplayState. > > > > This code screams for more cleanup. > > Yes, it screams for more cleanups. > > MIPS Malta also no longer works, same reason as for the serial code: > > Malta creates a character device during machine init and writes some > characters to it. > This is now impossible because qemu_chr_printf can no longer be called > before text_consoles_set_display was called. > I have committed a fix in revision 6365. It is a bit ugly, don't hesistate to commit a better fix. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net