[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 22/49] memory: cpu_physical_memory_set_dirty_range()
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 22/49] memory: cpu_physical_memory_set_dirty_range() always dirty all flags |
Date: |
Mon, 13 Jan 2014 18:40:07 +0100 |
So remove the flag argument and do it directly. After this change,
there is nothing else using cpu_physical_memory_set_dirty_flags() so
remove it.
Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Orit Wasserman <address@hidden>
---
exec.c | 2 +-
include/exec/memory-internal.h | 11 ++---------
memory.c | 2 +-
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/exec.c b/exec.c
index ffda8be..f215960 100644
--- a/exec.c
+++ b/exec.c
@@ -1275,7 +1275,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void
*host,
last_ram_offset() >> TARGET_PAGE_BITS);
memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS),
0, size >> TARGET_PAGE_BITS);
- cpu_physical_memory_set_dirty_range(new_block->offset, size, 0xff);
+ cpu_physical_memory_set_dirty_range(new_block->offset, size);
qemu_ram_setup_dump(new_block->host, size);
qemu_madvise(new_block->host, size, QEMU_MADV_HUGEPAGE);
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
index 9f4ad69..681d63b 100644
--- a/include/exec/memory-internal.h
+++ b/include/exec/memory-internal.h
@@ -75,12 +75,6 @@ static inline int cpu_physical_memory_get_dirty(ram_addr_t
start,
return ret;
}
-static inline void cpu_physical_memory_set_dirty_flags(ram_addr_t addr,
- int dirty_flags)
-{
- ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] |= dirty_flags;
-}
-
static inline void cpu_physical_memory_set_dirty_flag(ram_addr_t addr,
int dirty_flag)
{
@@ -103,15 +97,14 @@ static inline int
cpu_physical_memory_clear_dirty_flags(ram_addr_t addr,
}
static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start,
- ram_addr_t length,
- int dirty_flags)
+ ram_addr_t length)
{
ram_addr_t addr, end;
end = TARGET_PAGE_ALIGN(start + length);
start &= TARGET_PAGE_MASK;
for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) {
- cpu_physical_memory_set_dirty_flags(addr, dirty_flags);
+ cpu_physical_memory_set_dirty(addr);
}
xen_modified_memory(addr, length);
}
diff --git a/memory.c b/memory.c
index e497f99..fb52e1c 100644
--- a/memory.c
+++ b/memory.c
@@ -1182,7 +1182,7 @@ void memory_region_set_dirty(MemoryRegion *mr, hwaddr
addr,
hwaddr size)
{
assert(mr->terminates);
- cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size, -1);
+ cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size);
}
bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr,
--
1.8.4.2
- [Qemu-devel] [PATCH 10/49] qemu-file: Move QEMUFile code to qemu-file.c, (continued)
- [Qemu-devel] [PATCH 10/49] qemu-file: Move QEMUFile code to qemu-file.c, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 09/49] vmstate: Move VMState code to vmstate.c, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 13/49] bitmap: use long as index, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 14/49] memory: cpu_physical_memory_set_dirty_flags() result is never used, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 15/49] memory: cpu_physical_memory_set_dirty_range() return void, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 16/49] exec: use accessor function to know if memory is dirty, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 17/49] memory: create function to set a single dirty bit, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 18/49] exec: create function to get a single dirty bit, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 20/49] memory: all users of cpu_physical_memory_get_dirty used only one flag, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 21/49] memory: set single dirty flags when possible, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 22/49] memory: cpu_physical_memory_set_dirty_range() always dirty all flags,
Juan Quintela <=
- [Qemu-devel] [PATCH 19/49] memory: make cpu_physical_memory_is_dirty return bool, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 23/49] memory: cpu_physical_memory_mask_dirty_range() always clears a single flag, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 24/49] memory: use bit 2 for migration, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 25/49] memory: make sure that client is always inside range, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 26/49] memory: only resize dirty bitmap when memory size increases, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 27/49] memory: cpu_physical_memory_clear_dirty_flag() result is never used, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 28/49] bitmap: Add bitmap_zero_extend operation, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 30/49] memory: unfold cpu_physical_memory_clear_dirty_flag() in its only user, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 31/49] memory: unfold cpu_physical_memory_set_dirty() in its only user, Juan Quintela, 2014/01/13
- [Qemu-devel] [PATCH 29/49] memory: split dirty bitmap into three, Juan Quintela, 2014/01/13