From 2ab033fca211b213418a7d9ac3c33b4cc7ef056d Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Tue, 12 May 2009 20:24:14 -0300 Subject: [PATCH] Enable dirty logging for all regions during migration 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 Signed-off-by: Avi Kivity --- qemu-kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 6893cfe4bf..2247c6c4de 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1233,7 +1233,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; -- 2.11.4.GIT