[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/29] memory: the only dirty memory flag for users
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 01/29] memory: the only dirty memory flag for users is DIRTY_MEMORY_VGA |
Date: |
Mon, 27 Apr 2015 18:28:09 +0200 |
DIRTY_MEMORY_MIGRATION is triggered by memory_global_dirty_log_start
and memory_global_dirty_log_stop, so it cannot be used with
memory_region_set_log.
Specify this in the documentation and assert it.
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/exec/memory.h | 3 +--
memory.c | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index a2ea587..081f7d6 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -625,8 +625,7 @@ void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t
newsize,
*
* @mr: the memory region being updated.
* @log: whether dirty logging is to be enabled or disabled.
- * @client: the user of the logging information; %DIRTY_MEMORY_MIGRATION or
- * %DIRTY_MEMORY_VGA.
+ * @client: the user of the logging information; %DIRTY_MEMORY_VGA only.
*/
void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client);
diff --git a/memory.c b/memory.c
index a11e9bf..e688f5e 100644
--- a/memory.c
+++ b/memory.c
@@ -1354,6 +1354,7 @@ void memory_region_set_log(MemoryRegion *mr, bool log,
unsigned client)
{
uint8_t mask = 1 << client;
+ assert(client == DIRTY_MEMORY_VGA);
memory_region_transaction_begin();
mr->dirty_log_mask = (mr->dirty_log_mask & ~mask) | (log * mask);
memory_region_update_pending |= mr->enabled;
--
1.8.3.1
- [Qemu-devel] [PATCH 20/29] exec: invert return value of cpu_physical_memory_get_clean, rename, (continued)
- [Qemu-devel] [PATCH 20/29] exec: invert return value of cpu_physical_memory_get_clean, rename, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 22/29] memory: do not touch code dirty bitmap unless TCG is enabled, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 19/29] exec: pass client mask to cpu_physical_memory_set_dirty_range, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 23/29] bitmap: add atomic set functions, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 24/29] bitmap: add atomic test and clear, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 25/29] memory: use atomic ops for setting dirty memory bits, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 27/29] memory: replace cpu_physical_memory_reset_dirty() with test-and-clear, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 28/29] memory: make cpu_physical_memory_sync_dirty_bitmap() fully atomic, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 26/29] migration: move dirty bitmap sync to ram_addr.h, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 29/29] memory: strengthen assertions on mr->terminates, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 01/29] memory: the only dirty memory flag for users is DIRTY_MEMORY_VGA,
Paolo Bonzini <=