Received: from [140.186.70.92] (port=55013 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJoaH-0002Nc-PZ for qemu-devel@nongnu.org; Wed, 02 Jun 2010 10:06:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJoaC-00006j-Ex for qemu-devel@nongnu.org; Wed, 02 Jun 2010 10:06:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16154) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJoaC-00006b-8M for qemu-devel@nongnu.org; Wed, 02 Jun 2010 10:06:12 -0400 Date: Wed, 2 Jun 2010 11:06:08 -0300 From: Glauber Costa Message-ID: <20100602140608.GP19104@mothafucka.localdomain> References: <1275414976-18258-1-git-send-email-glommer@redhat.com> <1275414976-18258-2-git-send-email-glommer@redhat.com> <1275414976-18258-3-git-send-email-glommer@redhat.com> <4C0604FE.8070402@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C0604FE.8070402@web.de> Subject: [Qemu-devel] Re: [PATCH v2 2/2] basic machine opts framework List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Wed, Jun 02, 2010 at 09:15:10AM +0200, Jan Kiszka wrote: > > > > +QemuOptsList qemu_machine_opts = { > > + .name = "M", > > + .head = QTAILQ_HEAD_INITIALIZER(qemu_machine_opts.head), > > + .desc = { > > + { > > + .name = "mach", > > + .type = QEMU_OPT_STRING, > > + },{ > > + .name = "irqchip", > > + .type = QEMU_OPT_STRING, > > + }, > > Can't we make the concrete machine define what options it needs? Pushing > this into the generic code may soon end up in a bunch of very special > switches that are unused on most machines or even have no meaning for them. > > Also, I would suggest to introduce the generic part first, and then add > first users like the x86 irqchip. Yeah, in general, I do agree with you. Me and anthony talked about it for a while some time ago, and more or less concluded that it could be possible to avoid that, putting a little think which options to add. the "irqchip" option, if you note, is not x86-specific, in any case. Any machine has an irqchip. The first idea was to use something like "apic=in_kernel|userspace" which would be, that, very x86-centric. So, since letting machines define their own options adds complexity, my take would be to add those common options, and add infrastructure for machine-specific options when we see something that makes it unavoidable. What do you think?