From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHwIR-0000pp-KK for qemu-devel@nongnu.org; Tue, 08 Dec 2009 04:23:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHwIM-0000nO-Pe for qemu-devel@nongnu.org; Tue, 08 Dec 2009 04:23:50 -0500 Received: from [199.232.76.173] (port=37419 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHwIM-0000nG-K4 for qemu-devel@nongnu.org; Tue, 08 Dec 2009 04:23:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31750) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHwIM-0007O4-4S for qemu-devel@nongnu.org; Tue, 08 Dec 2009 04:23:46 -0500 Message-ID: <4B1E1B1C.4020401@redhat.com> Date: Tue, 08 Dec 2009 10:23:40 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1260189773-20728-1-git-send-email-kraxel@redhat.com> <1260189773-20728-6-git-send-email-kraxel@redhat.com> <4B1D02BC.4050202@redhat.com> <4B1D13AB.8060107@redhat.com> <4B1D27E5.2090207@redhat.com> <23C42940-DBB1-472A-8E6F-F3EDDEB21223@suse.de> In-Reply-To: <23C42940-DBB1-472A-8E6F-F3EDDEB21223@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [FOR 0.12 PATCH v3 05/21] default devices: core code & serial lines. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com Hi, >> Doesn't make sense. The list is not about *creating* default devices, but about *not* creating them. > > Why do we need a negative list? Wouldn't it be a lot more useful to have positive lists? Maybe I'm just missing the whole point of your patchset though. Probably the latter ;) The situation we have right is (with the serial lines as example, the same applies to some other devices as well): (1) If you start qemu without any arguments, it will automagically create a chardev for the serial line (serial_hds[]), which then will be used by machine->init() to create the (board-specific) serial lines. (2) If you start qemu with -serial the specified chardev will be created and assigned to serial_hds[], which again will be used by machine->init() ... Worked fine before qdev appeared. Now we also can create serial lines like this: (3) Start qemu with '-device isa-serial,...'. Problem is this clashes with (1) and qemu will attempt to create the serial port twice. So this patchset introduces default_serial (+friends) to fix this issue. The new workflow is: * default_serial defaults to enabled, when qemu finds it still enabled after processing all command line the automagic default serial line is actually created. * If qemu finds '-serial ' it clears default_serial. * If qemu finds '-device isa-serial,...' it clears default_serial. - this fixes the conflict mentioned above. - other serial drivers can be added to the list if needed to solve the same conflict for them. * If qemu finds '-nodefaults' it clears default_serial (and the others). - new feature, figured this could be useful. What we could do on top of the above is: * If the board has the machine->no_serial flag set, clear default_serial. s390 could set that flag then and qemu would stop creating a chardev for a serial line nobody will ever use because s390 has no serial ports. /me hopes the whole picture is more clear now. cheers, Gerd