From: Paolo Bonzini <pbonzini@redhat.com>
To: Vincent KHERBACHE <vincent.kherbache@inria.fr>, qemu-devel@nongnu.org
Cc: gleb@redhat.com
Subject: Re: [Qemu-devel] [PATCH] kvm: fix kvm_set_migration_log() behavior
Date: Tue, 18 Feb 2014 17:16:20 +0100 [thread overview]
Message-ID: <53038754.7000304@redhat.com> (raw)
In-Reply-To: <1392726818-14606-1-git-send-email-vincent.kherbache@inria.fr>
Il 18/02/2014 13:33, Vincent KHERBACHE ha scritto:
> diff --git a/kvm-all.c b/kvm-all.c
> index 2ca9143..f104f87 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -355,7 +355,7 @@ static int kvm_set_migration_log(int enable)
> {
> KVMState *s = kvm_state;
> KVMSlot *mem;
> - int i, err;
> + int i, err = 0;
>
> s->migration_log = enable;
>
> @@ -365,15 +365,9 @@ static int kvm_set_migration_log(int enable)
> if (!mem->memory_size) {
> continue;
> }
> - if (!!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES) == enable) {
> - continue;
> - }
> - err = kvm_set_user_memory_region(s, mem);
> - if (err) {
> - return err;
> - }
> + err = kvm_slot_dirty_pages_log_change(mem, (bool)enable);
> }
> - return 0;
> + return err;
> }
This patch is not correct, because it introduces another one: if dirty
logging was enabled on the memory region (kvm_dirty_pages_log_change),
it will be disabled after migration.
Can you explain better the problem? I cannot see anything wrong in the
code, though it is not the clearest. Note that the effects of
kvm_set_migration_log and kvm_dirty_pages_log_change should be logically
ORed.
Paolo
next prev parent reply other threads:[~2014-02-18 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 12:33 [Qemu-devel] [PATCH] kvm: fix kvm_set_migration_log() behavior Vincent KHERBACHE
2014-02-18 13:23 ` Eric Blake
2014-02-18 14:34 ` Vincent KHERBACHE
2014-02-18 16:16 ` Paolo Bonzini [this message]
2014-02-18 17:58 ` Vincent KHERBACHE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53038754.7000304@redhat.com \
--to=pbonzini@redhat.com \
--cc=gleb@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vincent.kherbache@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.