[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 07/13] target/i386: sev: do not create launch con
From: |
Singh, Brijesh |
Subject: |
[Qemu-devel] [PATCH v2 07/13] target/i386: sev: do not create launch context for an incoming guest |
Date: |
Wed, 10 Jul 2019 20:23:04 +0000 |
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.
Signed-off-by: Brijesh Singh <address@hidden>
---
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 6dbdc3cdf1..49baf8fef0 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -789,10 +789,16 @@ sev_guest_init(const char *id)
goto err;
}
- ret = sev_launch_start(s);
- if (ret) {
- error_report("%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(s);
+ if (ret) {
+ error_report("%s: failed to create encryption context", __func__);
+ goto err;
+ }
}
ram_block_notifier_add(&sev_ram_notifier);
--
2.17.1
- [Qemu-devel] [PATCH v2 05/13] doc: update AMD SEV API spec web link, (continued)
[Qemu-devel] [PATCH v2 07/13] target/i386: sev: do not create launch context for an incoming guest,
Singh, Brijesh <=
[Qemu-devel] [PATCH v2 08/13] misc.json: add migrate-set-sev-info command, Singh, Brijesh, 2019/07/10
[Qemu-devel] [PATCH v2 09/13] target/i386: sev: add support to encrypt the outgoing page, Singh, Brijesh, 2019/07/10
[Qemu-devel] [PATCH v2 13/13] target/i386: sev: remove migration blocker, Singh, Brijesh, 2019/07/10