On 02/04/2015 13:52, zhanghailiang wrote: > diff --git a/exec.c b/exec.c > index 874ecfc..4b1b39b 100644 > --- a/exec.c > +++ b/exec.c > @@ -59,7 +59,7 @@ > //#define DEBUG_SUBPAGE > > #if !defined(CONFIG_USER_ONLY) > -static bool in_migration; > +bool in_migration; > > /* ram_list is read under rcu_read_lock()/rcu_read_unlock(). Writes > * are protected by the ramlist lock. > diff --git a/kvm-all.c b/kvm-all.c > index 335438a..dd75eff 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -128,6 +128,8 @@ bool kvm_allowed; > bool kvm_readonly_mem_allowed; > bool kvm_vm_attributes_allowed; > > +extern bool in_migration; > + > static const KVMCapabilityInfo kvm_required_capabilites[] = { > KVM_CAP_INFO(USER_MEMORY), > KVM_CAP_INFO(DESTROY_MEMORY_REGION_WORKS), > @@ -715,7 +717,7 @@ static void kvm_set_phys_mem(MemoryRegionSection > *section, bool add) > > old = *mem; > > - if (mem->flags & KVM_MEM_LOG_DIRTY_PAGES) { > + if (mem->flags & KVM_MEM_LOG_DIRTY_PAGES || in_migration) { > kvm_physical_sync_dirty_bitmap(section); > } >
Applied for 2.3. Paolo