Loading exec.c +10 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include "sysemu/kvm.h" #include "sysemu/sysemu.h" #include "sysemu/tcg.h" #include "sysemu/qtest.h" #include "qemu/timer.h" #include "qemu/config-file.h" #include "qemu/error-report.h" Loading Loading @@ -2316,8 +2317,15 @@ static void ram_block_add(RAMBlock *new_block, Error **errp, bool shared) if (new_block->host) { qemu_ram_setup_dump(new_block->host, new_block->max_length); qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_HUGEPAGE); /* MADV_DONTFORK is also needed by KVM in absence of synchronous MMU */ qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_DONTFORK); /* * MADV_DONTFORK is also needed by KVM in absence of synchronous MMU * Configure it unless the machine is a qtest server, in which case * KVM is not used and it may be forked (eg for fuzzing purposes). */ if (!qtest_enabled()) { qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_DONTFORK); } ram_block_notify_add(new_block->host, new_block->max_length); } } Loading Loading
exec.c +10 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include "sysemu/kvm.h" #include "sysemu/sysemu.h" #include "sysemu/tcg.h" #include "sysemu/qtest.h" #include "qemu/timer.h" #include "qemu/config-file.h" #include "qemu/error-report.h" Loading Loading @@ -2316,8 +2317,15 @@ static void ram_block_add(RAMBlock *new_block, Error **errp, bool shared) if (new_block->host) { qemu_ram_setup_dump(new_block->host, new_block->max_length); qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_HUGEPAGE); /* MADV_DONTFORK is also needed by KVM in absence of synchronous MMU */ qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_DONTFORK); /* * MADV_DONTFORK is also needed by KVM in absence of synchronous MMU * Configure it unless the machine is a qtest server, in which case * KVM is not used and it may be forked (eg for fuzzing purposes). */ if (!qtest_enabled()) { qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_DONTFORK); } ram_block_notify_add(new_block->host, new_block->max_length); } } Loading