public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com, ehabkost@redhat.com,
	Glauber de Oliveira Costa <glommer@redhat.com>
Subject: [PATCH] Enable dirty logging for all regions during migration
Date: Tue, 12 May 2009 20:24:14 -0300	[thread overview]
Message-ID: <1242170654-8685-1-git-send-email-glommer@redhat.com> (raw)

From: Glauber de Oliveira Costa <glommer@redhat.com>

In current calculations, we are not activating dirty logging
for all regions, leading migration to fail. This problem was
already raised by Yaniv Kamay a while ago. The proposed
solution at the time (not merged), was a calculation to convert
from target_phys_addr_t to ram_addr_t, which the dirty logging code
expects.

Avi noticed that enabling dirty logging for the region 0 -> -1ULL
would do the trick. As I hit the problem, I can confirm it does.

This patch, therefore, goes with this simpler approach. Before
this patch, migration fails. With this patch, simple migration
tests succeds.

Signed-off-by: Glauber de Oliveira Costa <glommer@redhat.com>
---
 qemu-kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index f55cee8..b5d4313 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1244,7 +1244,7 @@ int kvm_update_dirty_pages_log(void)
     int r = 0;
 
 
-    r = kvm_get_dirty_pages_range(kvm_context, 0, phys_ram_size,
+    r = kvm_get_dirty_pages_range(kvm_context, 0, -1ULL,
                                   kvm_dirty_bitmap, NULL,
                                   kvm_get_dirty_bitmap_cb);
     return r;
-- 
1.6.2.2


             reply	other threads:[~2009-05-12 23:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12 23:24 Glauber Costa [this message]
2009-05-13  7:00 ` [PATCH] Enable dirty logging for all regions during migration Avi Kivity

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=1242170654-8685-1-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=avi@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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