summaryrefslogtreecommitdiff
path: root/cpu-common.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-04-06 22:25:38 +0300
committerMichael S. Tsirkin <mst@redhat.com>2011-04-06 22:28:40 +0300
commit0fd542fb7d13ddf12f897bb27c5950f31638b1df (patch)
tree3a5ea98b312b60c63440b4c3b0d039481746188d /cpu-common.h
parentafe3ef1d01dd767b6824c0580ecb92f6a27b75cc (diff)
cpu: add set_memory flag to request dirty logging
Pass the flag to all cpu notifiers, doing nothing at this point. Will be used by follow-up patches. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'cpu-common.h')
-rw-r--r--cpu-common.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/cpu-common.h b/cpu-common.h
index ef4e8dab7..c239cc0de 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -34,10 +34,21 @@ typedef unsigned long ram_addr_t;
typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value);
typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr);
-void cpu_register_physical_memory_offset(target_phys_addr_t start_addr,
- ram_addr_t size,
- ram_addr_t phys_offset,
- ram_addr_t region_offset);
+void cpu_register_physical_memory_log(target_phys_addr_t start_addr,
+ ram_addr_t size,
+ ram_addr_t phys_offset,
+ ram_addr_t region_offset,
+ bool log_dirty);
+
+static inline void cpu_register_physical_memory_offset(target_phys_addr_t start_addr,
+ ram_addr_t size,
+ ram_addr_t phys_offset,
+ ram_addr_t region_offset)
+{
+ cpu_register_physical_memory_log(start_addr, size, phys_offset,
+ region_offset, false);
+}
+
static inline void cpu_register_physical_memory(target_phys_addr_t start_addr,
ram_addr_t size,
ram_addr_t phys_offset)
@@ -91,7 +102,8 @@ struct CPUPhysMemoryClient {
void (*set_memory)(struct CPUPhysMemoryClient *client,
target_phys_addr_t start_addr,
ram_addr_t size,
- ram_addr_t phys_offset);
+ ram_addr_t phys_offset,
+ bool log_dirty);
int (*sync_dirty_bitmap)(struct CPUPhysMemoryClient *client,
target_phys_addr_t start_addr,
target_phys_addr_t end_addr);