[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 4/5] hw/machine: add qemu machine opts as pr
From: |
Marcel Apfelbaum |
Subject: |
Re: [Qemu-devel] [PATCH RFC 4/5] hw/machine: add qemu machine opts as properties to QemuMachineState |
Date: |
Thu, 30 Jan 2014 19:28:18 +0200 |
On Thu, 2014-01-30 at 17:48 +0100, Paolo Bonzini wrote:
> Il 30/01/2014 15:47, Marcel Apfelbaum ha scritto:
> > diff --git a/include/hw/boards.h b/include/hw/boards.h
> > index 3cd48fe..51bcaba 100644
> > --- a/include/hw/boards.h
> > +++ b/include/hw/boards.h
> > @@ -86,6 +86,21 @@ struct QemuMachineState {
> > Object parent;
> > /* public */
> >
> > + char *accel;
> > + bool kernel_irqchip;
> > + int kvm_shadow_mem;
> > + char *kernel;
> > + char *initrd;
> > + char *append;
Hi Paolo,
Thanks for the review,
>
> Many of these are in init_args as well.
>
> Perhaps you can include the init_args by value instead of having a
> pointer, and make the setters store into the init_args. It should be
> fairly easy to use ¤t_machine->init_args in vl.c instead of the
> current
>
> QEMUMachineInitArgs args = { .machine = machine,
> .ram_size = ram_size,
> .boot_order = boot_order,
> .kernel_filename = kernel_filename,
> .kernel_cmdline = kernel_cmdline,
> .initrd_filename = initrd_filename,
> .cpu_model = cpu_model };
> machine->init(&args);
Sure it will be by value or... I plan to replace QEMUMachineInitArgs
with regular QOM properties of QemuMachineState.
>
> Otherwise the series is nice!
Thanks!
>
> Do you think it makes sense to prepend something like "machine::" or
> "machine-" to the class name?
I am not familiar with the QOM classes naming convention,
so I see no reason why not... what are the current guidelines?
prefix-<name>, prefix::<name>, what is preferable?
Thanks,
Marcel
>
> Paolo
>
> > + char *dtb;
> > + char *dumpdtb;
> > + int phandle_start;
> > + char *dt_compatible;
> > + bool dump_guest_core;
> > + bool mem_merge;
> > + bool usb;
> > + char *firmware;
> > +
> > QEMUMachineInitArgs *init_args;
>