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

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

 



Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@xxxxxxxxxxxxx>
Signed-off-by: OHMURA Kei <ohmura.kei@xxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux