Message ID | 1473415330-24456-1-git-send-email-caoj.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/09/2016 12:02, Cao jin wrote: > kvm_setup_guest_memory() also just does "madivse to QEMU_MADV_DONTFORK". > > Signed-off-by: Cao jin <caoj.fnst@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); > - } > } > } > > I guess it can be removed. If you want to do so, please remove kvm_setup_guest_memory completely. Also please add a comment before the qemu_madvise, saying that this is also needed by KVM if there is no synchronous MMU. Paolo
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); - } } }
kvm_setup_guest_memory() also just does "madivse to QEMU_MADV_DONTFORK". Signed-off-by: Cao jin <caoj.fnst@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(-)