From 66ab02bc657f102955f3077914bbaf00bc6546e9 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 14 Jan 2014 15:07:15 +0100 Subject: [PATCH 04/40] exec: use accessor function to know if memory is dirty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Juan Quintela Message-id: <1389712071-23303-5-git-send-email-quintela@redhat.com> Patchwork-id: 56662 O-Subject: [RHEL7 qemu-kvm PATCH 04/40] exec: use accessor function to know if memory is dirty Bugzilla: 997559 RH-Acked-by: Paolo Bonzini RH-Acked-by: Orit Wasserman RH-Acked-by: Dr. David Alan Gilbert (git) Signed-off-by: Juan Quintela Reviewed-by: Orit Wasserman Reviewed-by: Eric Blake (cherry picked from commit 06567942e5e92cc649b608205d5d31ff3ac21c58) Conflicts: exec.c Conflict is due to the following comming irrelevant to migration: ommit 4917cf44326a1bda2fd7f27303aff7a25ad86518 Author: Andreas Färber Date: Mon May 27 05:17:50 2013 +0200 cpu: Replace cpu_single_env with CPUState current_cpu Signed-off-by: Juan Quintela --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Miroslav Rezanina --- exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/exec.c b/exec.c index 571cea4..389888d 100644 --- a/exec.c +++ b/exec.c @@ -1505,7 +1505,7 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr, cpu_physical_memory_set_dirty_flags(ram_addr, dirty_flags); /* we remove the notdirty callback only if the code has been flushed */ - if (dirty_flags == 0xff) + if (cpu_physical_memory_is_dirty(ram_addr)) tlb_set_dirty(cpu_single_env, cpu_single_env->mem_io_vaddr); } -- 1.7.1