qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.a@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: peter.maydell@linaro.org, mst@redhat.com, armbru@redhat.com,
	qemu-devel@nongnu.org, lcapitulino@redhat.com,
	blauwirbel@gmail.com, aliguori@amazon.com, afaerber@suse.de
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	[thread overview]
Message-ID: <1391102898.2197.29.camel@localhost.localdomain> (raw)
In-Reply-To: <52EA825D.5030900@redhat.com>

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 &current_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;
> 

  reply	other threads:[~2014-01-30 17:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 14:47 [Qemu-devel] [PATCH RFC 0/5] qemu-machine as a QOM object Marcel Apfelbaum
2014-01-30 14:47 ` [Qemu-devel] [PATCH RFC 1/5] hw/core: introduced qemu machine as " Marcel Apfelbaum
2014-01-30 14:47 ` [Qemu-devel] [PATCH RFC 2/5] vl: use qemu machine QOM class instead of global machines list Marcel Apfelbaum
2014-01-30 14:47 ` [Qemu-devel] [PATCH RFC 3/5] hw/boards: converted current_machine to be an instance of QemuMachineCLass Marcel Apfelbaum
2014-01-30 14:47 ` [Qemu-devel] [PATCH RFC 4/5] hw/machine: add qemu machine opts as properties to QemuMachineState Marcel Apfelbaum
2014-01-30 16:48   ` Paolo Bonzini
2014-01-30 17:28     ` Marcel Apfelbaum [this message]
2014-01-30 17:29       ` Paolo Bonzini
2014-01-30 14:47 ` [Qemu-devel] [PATCH RFC 5/5] vl.c: set current_machine's properties Marcel Apfelbaum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391102898.2197.29.camel@localhost.localdomain \
    --to=marcel.a@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).