Enable dirty logging for all regions during migration
PATCH 1/1 Enable dirty logging for all regions during migration
From: Glauber de Oliveira Costa <[email protected]>
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.
--- qemu-kvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
qemu-kvm.c +1 -1
@@ -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;
Signature · 1 line
1.6.2.2
Avi Kivity
AppliedQuoted 9 lines · Glauber Costa
From: Glauber de Oliveira Costa <[email protected]>
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_ttoram_addr_t, which the dirty logging code expects.
Quoted 8 lines
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.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.