Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > aadbe78a25743146bb784eee19f007c5 > files > 101

kvm-83-164.el5_5.9.src.rpm

From 7a27badc6ecff2b715e7bf0d0e8de1bde05208c0 Mon Sep 17 00:00:00 2001
From: Glauber de Oliveira Costa <glommer@redhat.com>
Date: Wed, 13 May 2009 15:28:43 -0400
Subject: [PATCH 02/14] 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 <glommer@redhat.com>
Message-Id: <1242242923-7644-3-git-send-email-glommer@redhat.com>
RH-Upstream-status: applied(kvm/master)
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Dor Laor <dlaor@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: john cooper <john.cooper@redhat.com>
Bugzilla: 503793
---
 qemu/qemu-kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index 5225c7a..7923766 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -1231,7 +1231,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.3.rc4.29.g8146