diff mbox

[v2,1/6] Modify DIRTY_FLAG value to use as indexes of bit-based phys_ram_dirty.

Message ID 1270515084-24120-2-git-send-email-tamura.yoshiaki@lab.ntt.co.jp
State New
Headers show

Commit Message

Yoshiaki Tamura April 6, 2010, 12:51 a.m. UTC
Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
---
 cpu-all.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff mbox

Patch

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)