加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
migration-ram-Accelerate-the-loading-of-CSV-guest-s-.patch 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-09-18 15:20 . QEMU update to version 8.2.0-18:
From eac3cab8dcd005b33365b5196801268d696a11bc Mon Sep 17 00:00:00 2001
From: fangbaoshun <fangbaoshun@hygon.cn>
Date: Mon, 2 Aug 2021 14:49:45 +0800
Subject: [PATCH] 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 <hanliyang@hygon.cn>
---
migration/ram.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index 7747f5af3a..790c0413c1 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1297,6 +1297,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.windows.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化