From 123d15363567338ecaf415ddb57b408beee82bc4 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann <kraxel@redhat.com> Date: Wed, 26 May 2010 12:23:49 -0300 Subject: [PATCH] New slots need dirty tracking enabled when migrating. RH-Author: Gerd Hoffmann <kraxel@redhat.com> Message-id: <1274876629-25849-1-git-send-email-kraxel@redhat.com> Patchwork-id: 9572 O-Subject: [RHEL-5 kvm PATCH] New slots need dirty tracking enabled when migrating. Bugzilla: 567046 RH-Acked-by: Alex Williamson <alex.williamson@redhat.com> RH-Acked-by: Juan Quintela <quintela@redhat.com> RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> When the guest remaps PCI regions kvm will delete and re-create the memory slots. When creating the new slots we have to enable dirty logging there in case migration is in progress, otherwise reading the dirty maps for the remapped PCI region stops working. bugzilla: #567046 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- libkvm/libkvm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- libkvm/libkvm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 5d22f3e..565019f 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -543,6 +543,8 @@ int kvm_register_phys_mem(kvm_context_t kvm, } register_slot(memory.slot, memory.guest_phys_addr, memory.memory_size, memory.userspace_addr, memory.flags); + if (kvm->dirty_pages_log_all) + kvm_dirty_pages_log_enable_slot(kvm, phys_start, len); return 0; } -- 1.7.0.3