[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 31/39] memory: cpu_physical_memory_set_dirty_trackin
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 31/39] memory: cpu_physical_memory_set_dirty_tracking() should return void |
Date: |
Wed, 6 Nov 2013 14:04:40 +0100 |
Result was always 0, and not used anywhere. Once there, use bool type
for the parameter.
Signed-off-by: Juan Quintela <address@hidden>
---
exec.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index 984b417..11b434b 100644
--- a/exec.c
+++ b/exec.c
@@ -54,7 +54,7 @@
//#define DEBUG_SUBPAGE
#if !defined(CONFIG_USER_ONLY)
-static int in_migration;
+static bool in_migration;
RAMList ram_list = { .blocks = QTAILQ_HEAD_INITIALIZER(ram_list.blocks) };
@@ -676,11 +676,9 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start,
ram_addr_t length,
}
}
-static int cpu_physical_memory_set_dirty_tracking(int enable)
+static void cpu_physical_memory_set_dirty_tracking(bool enable)
{
- int ret = 0;
in_migration = enable;
- return ret;
}
hwaddr memory_region_section_get_iotlb(CPUArchState *env,
@@ -1699,12 +1697,12 @@ static void tcg_commit(MemoryListener *listener)
static void core_log_global_start(MemoryListener *listener)
{
- cpu_physical_memory_set_dirty_tracking(1);
+ cpu_physical_memory_set_dirty_tracking(true);
}
static void core_log_global_stop(MemoryListener *listener)
{
- cpu_physical_memory_set_dirty_tracking(0);
+ cpu_physical_memory_set_dirty_tracking(false);
}
static MemoryListener core_memory_listener = {
--
1.8.3.1
- [Qemu-devel] [PATCH 24/39] memory: cpu_physical_memory_get_dirty() is used as returning a bool, (continued)
- [Qemu-devel] [PATCH 24/39] memory: cpu_physical_memory_get_dirty() is used as returning a bool, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 26/39] memory: use find_next_bit() to find dirty bits, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 25/39] memory: s/mask/clear/ cpu_physical_memory_mask_dirty_range, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 27/39] memory: cpu_physical_memory_set_dirty_range() now uses bitmap operations, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 28/39] memory: cpu_physical_memory_clear_dirty_range() now uses bitmap operations, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 30/39] memory: make cpu_physical_memory_reset_dirty() take a length parameter, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 29/39] memory: s/dirty/clean/ in cpu_physical_memory_is_dirty(), Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 32/39] memory: split cpu_physical_memory_* functions to its own include, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 31/39] memory: cpu_physical_memory_set_dirty_tracking() should return void,
Juan Quintela <=
- [Qemu-devel] [PATCH 33/39] memory: unfold memory_region_test_and_clear(), Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 34/39] kvm: use directly cpu_physical_memory_* api for tracking dirty pages, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 35/39] kvm: refactor start address calculation, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 37/39] memory: syncronize kvm bitmap using bitmaps operations, Juan Quintela, 2013/11/06
- [Qemu-devel] [PATCH 36/39] memory: move bitmap synchronization to its own function, Juan Quintela, 2013/11/06