[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/39] exec: simplify notdirty_mem_write()
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 08/39] exec: simplify notdirty_mem_write() |
Date: |
Wed, 6 Nov 2013 14:04:17 +0100 |
We don't need to make special things for CODE, just set the other two bits
Signed-off-by: Juan Quintela <address@hidden>
---
exec.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index 36b0a66..27e4540 100644
--- a/exec.c
+++ b/exec.c
@@ -1374,12 +1374,8 @@ found:
static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
uint64_t val, unsigned size)
{
-
- int dirty_flags;
- dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr);
if (!cpu_physical_memory_get_dirty_flag(ram_addr, CODE_DIRTY_FLAG)) {
tb_invalidate_phys_page_fast(ram_addr, size);
- dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr);
}
switch (size) {
case 1:
@@ -1394,8 +1390,8 @@ static void notdirty_mem_write(void *opaque, hwaddr
ram_addr,
default:
abort();
}
- dirty_flags |= (0xff & ~CODE_DIRTY_FLAG);
- cpu_physical_memory_set_dirty_flags(ram_addr, dirty_flags);
+ cpu_physical_memory_set_dirty_flag(ram_addr, MIGRATION_DIRTY_FLAG);
+ cpu_physical_memory_set_dirty_flag(ram_addr, VGA_DIRTY_FLAG);
/* we remove the notdirty callback only if the code has been
flushed */
if (cpu_physical_memory_is_dirty(ram_addr)) {
--
1.8.3.1
- [Qemu-devel] [PATCH 01/39] Move prototypes to memory.h, (continued)
- [Qemu-devel] [PATCH 01/39] Move prototypes to memory.h, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 02/39] memory: cpu_physical_memory_set_dirty_flags() result is never used, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 04/39] exec: use accessor function to know if memory is dirty, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 03/39] memory: cpu_physical_memory_set_dirty_range() return void, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 06/39] exec: create function to get a single dirty bit, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 08/39] exec: simplify notdirty_mem_write(),
Juan Quintela <=
- [Qemu-devel] [PATCH 05/39] memory: create function to set a single dirty bit, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 07/39] memory: make cpu_physical_memory_is_dirty return bool, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 10/39] memory: set single dirty flags when possible, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 11/39] memory: cpu_physical_memory_set_dirty_range() allways dirty all flags, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 09/39] memory: all users of cpu_physical_memory_get_dirty used only one flag, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 12/39] memory: cpu_physical_memory_mask_dirty_range() always clear a single flag, Juan Quintela, 2013/11/06