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.