kvm_setup_guest_memory() also just does "madivse to QEMU_MADV_DONTFORK".
Signed-off-by: Cao jin <caoj.f...@cn.fujitsu.com> --- Though I don't understand these code well, tt seems is duplicate code to me. But I am not sure whether I am doing the right thing, so, RFC. exec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/exec.c b/exec.c index 80398b0..819f7cd 100644 --- a/exec.c +++ b/exec.c @@ -1623,9 +1623,6 @@ static void ram_block_add(RAMBlock *new_block, Error **errp) qemu_ram_setup_dump(new_block->host, new_block->max_length); qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_HUGEPAGE); qemu_madvise(new_block->host, new_block->max_length, QEMU_MADV_DONTFORK); - if (kvm_enabled()) { - kvm_setup_guest_memory(new_block->host, new_block->max_length); - } } } -- 2.1.0