From: Marcel Apfelbaum Date: Wed, 4 Feb 2015 15:43:53 +0000 (+0200) Subject: machine: query phandle-start machine property X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~284^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cabe7fa6deeffeed9a3e6d996d6107c94965948;p=sdk%2Femulator%2Fqemu.git machine: query phandle-start machine property Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Query phandle-start by accessing machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini --- diff --git a/device_tree.c b/device_tree.c index 4cb1cd5..3d119ef 100644 --- a/device_tree.c +++ b/device_tree.c @@ -24,7 +24,7 @@ #include "sysemu/device_tree.h" #include "sysemu/sysemu.h" #include "hw/loader.h" -#include "qemu/option.h" +#include "hw/boards.h" #include "qemu/config-file.h" #include @@ -245,8 +245,7 @@ uint32_t qemu_fdt_alloc_phandle(void *fdt) * which phandle id to start allocting phandles. */ if (!phandle) { - phandle = qemu_opt_get_number(qemu_get_machine_opts(), - "phandle_start", 0); + phandle = machine_phandle_start(current_machine); } if (!phandle) { diff --git a/hw/core/machine.c b/hw/core/machine.c index 0ad5b12..5ad2409 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -420,6 +420,11 @@ int machine_kvm_shadow_mem(MachineState *machine) return machine->kvm_shadow_mem; } +int machine_phandle_start(MachineState *machine) +{ + return machine->phandle_start; +} + static const TypeInfo machine_info = { .name = TYPE_MACHINE, .parent = TYPE_OBJECT, diff --git a/include/hw/boards.h b/include/hw/boards.h index 4be3cd1..1f21bdf 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -70,6 +70,7 @@ bool machine_iommu(MachineState *machine); bool machine_kernel_irqchip_allowed(MachineState *machine); bool machine_kernel_irqchip_required(MachineState *machine); int machine_kvm_shadow_mem(MachineState *machine); +int machine_phandle_start(MachineState *machine); /** * MachineClass: