qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>
Subject: [Qemu-devel] [PULL 5/6] kvm-all: Sync dirty-bitmap from kvm before kvm destroy the corresponding dirty_bitmap
Date: Thu,  2 Apr 2015 16:21:30 +0200	[thread overview]
Message-ID: <1427984491-23475-6-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1427984491-23475-1-git-send-email-pbonzini@redhat.com>

From: zhanghailiang <zhang.zhanghailiang@huawei.com>

Sometimes, we destroy the dirty_bitmap in kvm_memory_slot before any sync action
occur, this bit in dirty_bitmap will be missed, and which will lead the corresponding
dirty pages to be missed in migration.

This usually happens when do migration during VM's Start-up or Reboot.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
[Use s->migration_log instead of exec.c's in_migration. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kvm-all.c b/kvm-all.c
index 335438a..dd44f8c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -715,7 +715,7 @@ static void kvm_set_phys_mem(MemoryRegionSection *section, bool add)
 
         old = *mem;
 
-        if (mem->flags & KVM_MEM_LOG_DIRTY_PAGES) {
+        if ((mem->flags & KVM_MEM_LOG_DIRTY_PAGES) || s->migration_log) {
             kvm_physical_sync_dirty_bitmap(section);
         }
 
-- 
2.3.4

  parent reply	other threads:[~2015-04-02 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 14:21 [Qemu-devel] [PULL 0/6] More changes for QEMU 2.3.0-rc2 Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 1/6] target-i386: save 64-bit CR3 in 64-bit SMM state save area Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 2/6] qga: fitering out -fstack-protector-strong Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 3/6] target-i386: clear bsp bit when designating bsp Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 4/6] util/qemu-config: fix regression of qmp_query_command_line_options Paolo Bonzini
2015-04-02 14:21 ` Paolo Bonzini [this message]
2015-04-02 14:21 ` [Qemu-devel] [PULL 6/6] Use $(MAKE) for recursive make Paolo Bonzini
2015-04-02 15:52 ` [Qemu-devel] [PULL 0/6] More changes for QEMU 2.3.0-rc2 Peter Maydell

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=1427984491-23475-6-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).