From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8vPg-00022w-6q for qemu-devel@nongnu.org; Thu, 30 Jan 2014 12:28:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8vPZ-0001WS-GN for qemu-devel@nongnu.org; Thu, 30 Jan 2014 12:28:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8vPZ-0001Vz-7v for qemu-devel@nongnu.org; Thu, 30 Jan 2014 12:28:21 -0500 Message-ID: <1391102898.2197.29.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Thu, 30 Jan 2014 19:28:18 +0200 In-Reply-To: <52EA825D.5030900@redhat.com> References: <1391093245-14277-1-git-send-email-marcel.a@redhat.com> <1391093245-14277-5-git-send-email-marcel.a@redhat.com> <52EA825D.5030900@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 4/5] hw/machine: add qemu machine opts as properties to QemuMachineState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini 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 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-, prefix::, 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; >