Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuXfM-0002Be-6q for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:59:04 -0400 Received: from [140.186.70.92] (port=33147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuXfK-0002AP-Od for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:59:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuXfJ-0002pb-3e for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:59:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35583) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuXfI-0002pV-Rv for qemu-devel@nongnu.org; Wed, 24 Mar 2010 16:59:01 -0400 Date: Wed, 24 Mar 2010 17:58:55 -0300 From: Glauber Costa Subject: Re: [Qemu-devel] [PATCH 2/2] machine opts framework Message-ID: <20100324205855.GB11840@mothafucka.localdomain> References: <1269458782-6123-1-git-send-email-glommer@redhat.com> <1269458782-6123-2-git-send-email-glommer@redhat.com> <1269458782-6123-3-git-send-email-glommer@redhat.com> <4BAA6B67.6050904@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BAA6B67.6050904@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, avi@redhat.com On Wed, Mar 24, 2010 at 02:43:35PM -0500, Anthony Liguori wrote: > On 03/24/2010 02:26 PM, Glauber Costa wrote: > >This patch adds initial support for the -machine option, that allows > >command line specification of machine attributes (always relying on safe > >defaults). Besides its value per-se, it is the saner way we found to > >allow for enabling/disabling of kvm's in-kernel irqchip. > > > >A machine with in-kernel-irqchip could be specified as: > > -machine irqchip=apic-kvm > >And one without it: > > -machine irqchip=apic > > > >To demonstrate how it'd work, this patch introduces a choice between > >"pic" and "apic", pic being the old-style isa thing. > > I started from a different place. See machine-qemuopts in my staging tree. > > I think we should combine efforts. > > Regards, > Absolutely. I see little overlap between what we did. Just a comment on yours: -static void an5206_init(ram_addr_t ram_size, - const char *boot_device, - const char *kernel_filename, const char *kernel_cmdline, - const char *initrd_filename, const char *cpu_model) +static void an5206_init(QemuOpts *opts) { Since we're changing init functions anyway, I believe we should also pass a pointer to the machine structure. With that, we can avoing using the global current_machine.