summaryrefslogtreecommitdiffstats
path: root/include/exec/ram_addr.h
diff options
context:
space:
mode:
authorZhang Chen2018-09-03 06:38:48 +0200
committerJason Wang2018-10-19 05:15:03 +0200
commit13af18f2228892d19d40ff96672677d168da7e9e (patch)
tree3b2f851c82349606015b85fe2d688cc8643035cc /include/exec/ram_addr.h
parentCOLO: Remove colo_state migration struct (diff)
downloadqemu-13af18f2228892d19d40ff96672677d168da7e9e.tar.gz
qemu-13af18f2228892d19d40ff96672677d168da7e9e.tar.xz
qemu-13af18f2228892d19d40ff96672677d168da7e9e.zip
COLO: Load dirty pages into SVM's RAM cache firstly
We should not load PVM's state directly into SVM, because there maybe some errors happen when SVM is receving data, which will break SVM. We need to ensure receving all data before load the state into SVM. We use an extra memory to cache these data (PVM's ram). The ram cache in secondary side is initially the same as SVM/PVM's memory. And in the process of checkpoint, we cache the dirty pages of PVM into this ram cache firstly, so this ram cache always the same as PVM's memory at every checkpoint, then we flush this cached ram to SVM after we receive all PVM's state. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangckid@gmail.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/exec/ram_addr.h')
-rw-r--r--include/exec/ram_addr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 3abb639056..9ecd911c3e 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -27,6 +27,7 @@ struct RAMBlock {
struct rcu_head rcu;
struct MemoryRegion *mr;
uint8_t *host;
+ uint8_t *colo_cache; /* For colo, VM's ram cache */
ram_addr_t offset;
ram_addr_t used_length;
ram_addr_t max_length;