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