thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-memory-create-function-to-set-a-single-dirty-bit.patch

9ae3a8
From 7c7071e191d00c972db07e90eddb40ad9214fe59 Mon Sep 17 00:00:00 2001
9ae3a8
From: Juan Quintela <quintela@redhat.com>
9ae3a8
Date: Tue, 14 Jan 2014 15:07:16 +0100
9ae3a8
Subject: [PATCH 05/40] memory: create function to set a single dirty bit
9ae3a8
9ae3a8
RH-Author: Juan Quintela <quintela@redhat.com>
9ae3a8
Message-id: <1389712071-23303-6-git-send-email-quintela@redhat.com>
9ae3a8
Patchwork-id: 56657
9ae3a8
O-Subject: [RHEL7 qemu-kvm PATCH 05/40] memory: create function to set a single dirty bit
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 a1390db4df32ad95bf7854944180d2343f7f6368)
9ae3a8
Signed-off-by: Juan Quintela <quintela@trasno.org>
9ae3a8
---
9ae3a8
 cputlb.c                       | 2 +-
9ae3a8
 include/exec/memory-internal.h | 6 ++++++
9ae3a8
 2 files changed, 7 insertions(+), 1 deletion(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 cputlb.c                       |    2 +-
9ae3a8
 include/exec/memory-internal.h |    6 ++++++
9ae3a8
 2 files changed, 7 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
diff --git a/cputlb.c b/cputlb.c
9ae3a8
index aba7e44..84e83e0 100644
9ae3a8
--- a/cputlb.c
9ae3a8
+++ b/cputlb.c
9ae3a8
@@ -137,7 +137,7 @@ void tlb_protect_code(ram_addr_t ram_addr)
9ae3a8
 void tlb_unprotect_code_phys(CPUArchState *env, ram_addr_t ram_addr,
9ae3a8
                              target_ulong vaddr)
9ae3a8
 {
9ae3a8
-    cpu_physical_memory_set_dirty_flags(ram_addr, CODE_DIRTY_FLAG);
9ae3a8
+    cpu_physical_memory_set_dirty_flag(ram_addr, CODE_DIRTY_FLAG);
9ae3a8
 }
9ae3a8
 
9ae3a8
 static bool tlb_is_dirty_ram(CPUTLBEntry *tlbe)
9ae3a8
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
9ae3a8
index eac149a..4f476d2 100644
9ae3a8
--- a/include/exec/memory-internal.h
9ae3a8
+++ b/include/exec/memory-internal.h
9ae3a8
@@ -85,6 +85,12 @@ static inline void cpu_physical_memory_set_dirty_flags(ram_addr_t addr,
9ae3a8
     ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] |= dirty_flags;
9ae3a8
 }
9ae3a8
 
9ae3a8
+static inline void cpu_physical_memory_set_dirty_flag(ram_addr_t addr,
9ae3a8
+                                                      int dirty_flag)
9ae3a8
+{
9ae3a8
+    ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] |= dirty_flag;
9ae3a8
+}
9ae3a8
+
9ae3a8
 static inline void cpu_physical_memory_set_dirty(ram_addr_t addr)
9ae3a8
 {
9ae3a8
     cpu_physical_memory_set_dirty_flags(addr, 0xff);
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8