1 Star 0 Fork 22

OpenCloudOS-fork/qemu

forked from OpenCloudOS Stream/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0032-migration-ram-Accelerate-the-loading-of-CSV-guest-s-.patch 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
From 39c24000947b5f3036c41c310e6efbac088bb6e0 Mon Sep 17 00:00:00 2001
From: fangbaoshun <[email protected]>
Date: Mon, 2 Aug 2021 14:49:45 +0800
Subject: [PATCH 24/28] migration/ram: Accelerate the loading of CSV guest's
encrypted pages
When memory encryption is enabled, the guest memory will be encrypted with
the guest specific key. The patch introduces an accelerate solution which
queued the pages into list and load them togather by COMMAND_BATCH.
Signed-off-by: hanliyang <[email protected]>
---
migration/ram.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index be8dca326..c7245aa4d 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1295,6 +1295,14 @@ static int load_encrypted_data(QEMUFile *f, uint8_t *ptr)
return ops->load_incoming_page(f, ptr);
} else if (flag == RAM_SAVE_SHARED_REGIONS_LIST) {
return ops->load_incoming_shared_regions_list(f);
+ } else if (flag == RAM_SAVE_ENCRYPTED_PAGE_BATCH) {
+ return ops->queue_incoming_page(f, ptr);
+ } else if (flag == RAM_SAVE_ENCRYPTED_PAGE_BATCH_END) {
+ if (ops->queue_incoming_page(f, ptr)) {
+ error_report("Failed to queue incoming data");
+ return -EINVAL;
+ }
+ return ops->load_queued_incoming_pages(f);
} else {
error_report("unknown encrypted flag %x", flag);
return 1;
--
2.41.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/OpenCloudOS-fork/qemu.git
[email protected]:OpenCloudOS-fork/qemu.git
OpenCloudOS-fork
qemu
qemu
master

搜索帮助