aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-02-04 17:43:54 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-03-11 18:17:54 +0100
commit47c8ca533e502955a4e1b24056639c79500ab8f8 (patch)
treef96c0f4e8c5cf016f240fa0422cdd017c6ef21da /exec.c
parent66bd56694beef7fb8687767e6bec0264227c6b14 (diff)
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 <marcel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index b44a33c9a..f55270bde 100644
--- a/exec.c
+++ b/exec.c
@@ -26,6 +26,7 @@
#include "cpu.h"
#include "tcg.h"
#include "hw/hw.h"
+#include "hw/boards.h"
#include "hw/qdev.h"
#include "qemu/osdep.h"
#include "sysemu/kvm.h"
@@ -1250,8 +1251,7 @@ static void qemu_ram_setup_dump(void *addr, ram_addr_t size)
int ret;
/* Use MADV_DONTDUMP, if user doesn't want the guest memory in the core */
- if (!qemu_opt_get_bool(qemu_get_machine_opts(),
- "dump-guest-core", true)) {
+ if (!machine_dump_guest_core(current_machine)) {
ret = qemu_madvise(addr, size, QEMU_MADV_DONTDUMP);
if (ret) {
perror("qemu_madvise");