代码拉取完成,页面将自动刷新
From 36b08d0392f2baec061e6fb90416db42dfad20f7 Mon Sep 17 00:00:00 2001
From: Brijesh Singh <brijesh.singh@amd.com>
Date: Tue, 27 Jul 2021 12:16:09 +0000
Subject: [PATCH 05/29] target/i386: sev: do not create launch context for an
incoming guest
cherry-picked from https://github.com/AMDESE/qemu/commit/b85694233495.
The LAUNCH_START is used for creating an encryption context to encrypt
newly created guest, for an incoming guest the RECEIVE_START should be
used.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
---
target/i386/sev.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 5dd6c0a3f..fc8a2bb61 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -1024,10 +1024,16 @@ int sev_kvm_init(ConfidentialGuestSupport *cgs, Error **errp)
}
}
- ret = sev_launch_start(sev);
- if (ret) {
- error_setg(errp, "%s: failed to create encryption context", __func__);
- goto err;
+ /*
+ * The LAUNCH context is used for new guest, if its an incoming guest
+ * then RECEIVE context will be created after the connection is established.
+ */
+ if (!runstate_check(RUN_STATE_INMIGRATE)) {
+ ret = sev_launch_start(sev);
+ if (ret) {
+ error_setg(errp, "%s: failed to create encryption context", __func__);
+ goto err;
+ }
}
/* CSV guest needs no notifier to reg/unreg memory */
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。