All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Enable dirty logging for all regions during migration
@ 2009-05-12 23:24 Glauber Costa
  2009-05-13  7:00 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Glauber Costa @ 2009-05-12 23:24 UTC (permalink / raw)
  To: kvm; +Cc: avi, ehabkost, Glauber de Oliveira Costa

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Enable dirty logging for all regions during migration
  2009-05-12 23:24 [PATCH] Enable dirty logging for all regions during migration Glauber Costa
@ 2009-05-13  7:00 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-05-13  7:00 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm, ehabkost

Glauber Costa wrote:
> 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.
>
>   

Applied, thanks.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-13  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 23:24 [PATCH] Enable dirty logging for all regions during migration Glauber Costa
2009-05-13  7:00 ` Avi Kivity

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.