qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 1/6] Modify DIRTY_FLAG value to use as indexes of


From: Yoshiaki Tamura
Subject: [Qemu-devel] [PATCH v2 1/6] Modify DIRTY_FLAG value to use as indexes of bit-based phys_ram_dirty.
Date: Tue, 6 Apr 2010 09:51:19 +0900

Signed-off-by: Yoshiaki Tamura <address@hidden>
Signed-off-by: OHMURA Kei <address@hidden>
---
 cpu-all.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cpu-all.h b/cpu-all.h
index f8bfa66..c409fad 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -853,7 +853,6 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, 
target_ulong addr);
 /* memory API */
 
 extern int phys_ram_fd;
-extern uint8_t *phys_ram_dirty;
 extern ram_addr_t ram_size;
 extern ram_addr_t last_ram_offset;
 
@@ -878,9 +877,16 @@ extern int mem_prealloc;
 /* Set if TLB entry is an IO callback.  */
 #define TLB_MMIO        (1 << 5)
 
+/* Use DIRTY_FLAG as indexes of bit-based phys_ram_dirty.
+   0x03 is empty to make it compatible with byte-based bitmap. */
+#define MASTER_DIRTY_FLAG    0x00
 #define VGA_DIRTY_FLAG       0x01
 #define CODE_DIRTY_FLAG      0x02
-#define MIGRATION_DIRTY_FLAG 0x08
+#define MIGRATION_DIRTY_FLAG 0x04
+
+#define NUM_DIRTY_FLAGS      5
+
+extern unsigned long *phys_ram_dirty[NUM_DIRTY_FLAGS];
 
 /* read dirty bit (return 0 or 1) */
 static inline int cpu_physical_memory_is_dirty(ram_addr_t addr)
-- 
1.7.0.31.g1df487





reply via email to

[Prev in Thread] Current Thread [Next in Thread]