Blame SOURCES/kvm-memory-all-users-of-cpu_physical_memory_get_dirty-us.patch

0a122b
From 34f281f51324d0b4638803025b2a107c37ee6c4c Mon Sep 17 00:00:00 2001
0a122b
From: Juan Quintela <quintela@redhat.com>
0a122b
Date: Tue, 14 Jan 2014 15:07:20 +0100
0a122b
Subject: [PATCH 09/40] memory: all users of cpu_physical_memory_get_dirty used only one flag
0a122b
0a122b
RH-Author: Juan Quintela <quintela@redhat.com>
0a122b
Message-id: <1389712071-23303-10-git-send-email-quintela@redhat.com>
0a122b
Patchwork-id: 56665
0a122b
O-Subject: [RHEL7 qemu-kvm PATCH 09/40] memory: all users of cpu_physical_memory_get_dirty used only one flag
0a122b
Bugzilla: 997559
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
0a122b
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
0a122b
0a122b
So cpu_physical_memory_get_dirty_flags is not needed anymore
0a122b
0a122b
Signed-off-by: Juan Quintela <quintela@redhat.com>
0a122b
Reviewed-by: Eric Blake <eblake@redhat.com>
0a122b
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
0a122b
(cherry picked from commit 36187e2ca0295364dcb9a3f256a6fcd77e983c02)
0a122b
Signed-off-by: Juan Quintela <quintela@trasno.org>
0a122b
---
0a122b
 include/exec/memory-internal.h | 9 ++-------
0a122b
 1 file changed, 2 insertions(+), 7 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 include/exec/memory-internal.h |    9 ++-------
0a122b
 1 files changed, 2 insertions(+), 7 deletions(-)
0a122b
0a122b
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
0a122b
index dfc03e1..571a5ef 100644
0a122b
--- a/include/exec/memory-internal.h
0a122b
+++ b/include/exec/memory-internal.h
0a122b
@@ -53,11 +53,6 @@ void qemu_ram_free_from_ptr(ram_addr_t addr);
0a122b
 #define CODE_DIRTY_FLAG      0x02
0a122b
 #define MIGRATION_DIRTY_FLAG 0x08
0a122b
 
0a122b
-static inline int cpu_physical_memory_get_dirty_flags(ram_addr_t addr)
0a122b
-{
0a122b
-    return ram_list.phys_dirty[addr >> TARGET_PAGE_BITS];
0a122b
-}
0a122b
-
0a122b
 static inline bool cpu_physical_memory_get_dirty_flag(ram_addr_t addr,
0a122b
                                                       int dirty_flag)
0a122b
 {
0a122b
@@ -76,7 +71,7 @@ static inline bool cpu_physical_memory_is_dirty(ram_addr_t addr)
0a122b
 
0a122b
 static inline int cpu_physical_memory_get_dirty(ram_addr_t start,
0a122b
                                                 ram_addr_t length,
0a122b
-                                                int dirty_flags)
0a122b
+                                                int dirty_flag)
0a122b
 {
0a122b
     int ret = 0;
0a122b
     ram_addr_t addr, end;
0a122b
@@ -84,7 +79,7 @@ static inline int cpu_physical_memory_get_dirty(ram_addr_t start,
0a122b
     end = TARGET_PAGE_ALIGN(start + length);
0a122b
     start &= TARGET_PAGE_MASK;
0a122b
     for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) {
0a122b
-        ret |= cpu_physical_memory_get_dirty_flags(addr) & dirty_flags;
0a122b
+        ret |= cpu_physical_memory_get_dirty_flag(addr, dirty_flag);
0a122b
     }
0a122b
     return ret;
0a122b
 }
0a122b
-- 
0a122b
1.7.1
0a122b