Revision 2ff3de68 exec.c
b/exec.c | ||
---|---|---|
31 | 31 |
#include "hw/qdev.h" |
32 | 32 |
#include "qemu/osdep.h" |
33 | 33 |
#include "sysemu/kvm.h" |
34 |
#include "sysemu/sysemu.h" |
|
34 | 35 |
#include "hw/xen/xen.h" |
35 | 36 |
#include "qemu/timer.h" |
36 | 37 |
#include "qemu/config-file.h" |
... | ... | |
1043 | 1044 |
static void qemu_ram_setup_dump(void *addr, ram_addr_t size) |
1044 | 1045 |
{ |
1045 | 1046 |
int ret; |
1046 |
QemuOpts *machine_opts; |
|
1047 | 1047 |
|
1048 | 1048 |
/* Use MADV_DONTDUMP, if user doesn't want the guest memory in the core */ |
1049 |
machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); |
|
1050 |
if (machine_opts && |
|
1051 |
!qemu_opt_get_bool(machine_opts, "dump-guest-core", true)) { |
|
1049 |
if (!qemu_opt_get_bool(qemu_get_machine_opts(), |
|
1050 |
"dump-guest-core", true)) { |
|
1052 | 1051 |
ret = qemu_madvise(addr, size, QEMU_MADV_DONTDUMP); |
1053 | 1052 |
if (ret) { |
1054 | 1053 |
perror("qemu_madvise"); |
... | ... | |
1095 | 1094 |
|
1096 | 1095 |
static int memory_try_enable_merging(void *addr, size_t len) |
1097 | 1096 |
{ |
1098 |
QemuOpts *opts; |
|
1099 |
|
|
1100 |
opts = qemu_opts_find(qemu_find_opts("machine"), 0); |
|
1101 |
if (opts && !qemu_opt_get_bool(opts, "mem-merge", true)) { |
|
1097 |
if (!qemu_opt_get_bool(qemu_get_machine_opts(), "mem-merge", true)) { |
|
1102 | 1098 |
/* disabled by the user */ |
1103 | 1099 |
return 0; |
1104 | 1100 |
} |
Also available in: Unified diff