From 47c8ca533e502955a4e1b24056639c79500ab8f8 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Wed, 4 Feb 2015 17:43:54 +0200 Subject: machine: query dump-guest-core machine property Running qemu-bin ... -machine pc,dump-guest-core=on leads to crash: x86_64-softmmu/qemu-system-x86_64 -machine pc,dump-guest-core=on qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Aborted (core dumped) This happens because the commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Fix this by querying 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 --- hw/core/machine.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hw/core/machine.c') diff --git a/hw/core/machine.c b/hw/core/machine.c index 5ad24093ad..80336839d5 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -285,6 +285,7 @@ static void machine_initfn(Object *obj) ms->kernel_irqchip_allowed = true; ms->kvm_shadow_mem = -1; + ms->dump_guest_core = true; object_property_add_str(obj, "accel", machine_get_accel, machine_set_accel, NULL); @@ -425,6 +426,11 @@ int machine_phandle_start(MachineState *machine) return machine->phandle_start; } +bool machine_dump_guest_core(MachineState *machine) +{ + return machine->dump_guest_core; +} + static const TypeInfo machine_info = { .name = TYPE_MACHINE, .parent = TYPE_OBJECT, -- cgit v1.2.3