[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Migration Bug? ] Occasionally, the content of VM's mem
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration |
Date: |
Thu, 02 Apr 2015 15:00:44 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
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