qemu-devel
[Top][All Lists]
Advanced

[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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH RFC 4/5] hw/machine: add qemu machine opts as properties to QemuMachineState
Date: Thu, 30 Jan 2014 17:48:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

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;

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);

Otherwise the series is nice!

Do you think it makes sense to prepend something like "machine::" or "machine-" to the class name?

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 via email to

[Prev in Thread] Current Thread [Next in Thread]