From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxjOR-0003yv-CQ for qemu-devel@nongnu.org; Tue, 13 Oct 2009 11:34:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxjOM-0003vz-4t for qemu-devel@nongnu.org; Tue, 13 Oct 2009 11:34:30 -0400 Received: from [199.232.76.173] (port=54517 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxjOL-0003vr-Ud for qemu-devel@nongnu.org; Tue, 13 Oct 2009 11:34:25 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:57930) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MxjOL-0005bW-6u for qemu-devel@nongnu.org; Tue, 13 Oct 2009 11:34:25 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e37.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id n9DFXEup017551 for ; Tue, 13 Oct 2009 09:33:14 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9DFXuKu087622 for ; Tue, 13 Oct 2009 09:33:59 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n9DFXl9u012012 for ; Tue, 13 Oct 2009 09:33:47 -0600 Message-ID: <4AD49DDA.8060101@us.ibm.com> Date: Tue, 13 Oct 2009 10:33:46 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option References: <1254953315-5761-2-git-send-email-glommer@redhat.com> <1254953315-5761-3-git-send-email-glommer@redhat.com> <1254953315-5761-4-git-send-email-glommer@redhat.com> <1254953315-5761-5-git-send-email-glommer@redhat.com> <1254953315-5761-6-git-send-email-glommer@redhat.com> <1254953315-5761-7-git-send-email-glommer@redhat.com> <1254953315-5761-8-git-send-email-glommer@redhat.com> <1254953315-5761-9-git-send-email-glommer@redhat.com> <1254953315-5761-10-git-send-email-glommer@redhat.com> <4ACD1D92.8080607@us.ibm.com> <20091007231405.GQ8092@mothafucka.localdomain> <4ACD2414.9000401@codemonkey.ws> <4AD319F6.70506@redhat.com> <4AD33774.1030001@us.ibm.com> <4AD34C75.8090803@redhat.com> <4AD359E6.50108@us.ibm.com> <4AD434BB.1080102@redhat.com> In-Reply-To: <4AD434BB.1080102@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Glauber Costa , qemu-devel@nongnu.org Gerd Hoffmann wrote: >> qemu should not have the concept of a default nic. > > Well, right now it has (likewise for serial, vga, ...). And it causes > problems with the qdev way of managing devices, so we have to find a > way to deal with it. There are a few separate issues that should be treated differently. For vga, it should just be a default device in the machine description. A special id should be used for the default vga card and -vga std should have the effect of modifying the a vga device of that id to be std. IOW, it should be -device-remove id=default_vga -device stdvga,id=default_vga. For serial, we default to having one port. Again, it should have a well known id and -serial none should be -device-remove id=default_serial. For nics, it's a bit complicated by the fact that -net nic doesn't require a model and by default, each machine may have a default model. We will likely have to preserve this as a config option which is unfortunate. That said, without -net none, we get a single network device. Again, it should have a well known id and -net none should remove that device. > Right now the default devices are tied to a command line switch, i.e. > in case there isn't a -serial switch specified qemu will add a default > serial device, even in case one was added via -device isa-serial. I don't think -device has to have the same property of -serial. That is, -device isa-serial doesn't need to replace the default serial device which is connected to a vc. Rather, we should allow a user to modify the char device associated with that default serial device via -set. We shouldn't think of it like we add a default -serial device if no -serial switch was used. Instead, there has always been a default isa-serial device. You can modify it via -set or you can remove it. -serial none removes it. For the first occurrence of -serial, it behaves like -set. Future occurrences of -set behave like -device isa-serial. -- Regards, Anthony Liguori