[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v1 07/12] target/i386: sev: do not create launch
From: |
Singh, Brijesh |
Subject: |
[Qemu-devel] [RFC PATCH v1 07/12] target/i386: sev: do not create launch context for an incoming guest |
Date: |
Thu, 20 Jun 2019 18:03:18 +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 dd3814e25f..1b05fcf9a9 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] [RFC PATCH v1 11/12] migration: add support to migrate page encryption bitmap, (continued)
- [Qemu-devel] [RFC PATCH v1 11/12] migration: add support to migrate page encryption bitmap, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 09/12] target/i386: sev: add support to encrypt the outgoing page, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 06/12] doc: update AMD SEV to include Live migration flow, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 01/12] linux-headers: update kernel header to include SEV migration commands, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 08/12] target.json: add migrate-set-sev-info command, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 12/12] target/i386: sev: remove migration blocker, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 02/12] kvm: introduce high-level API to support encrypted guest migration, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 05/12] doc: update AMD SEV API spec web link, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 07/12] target/i386: sev: do not create launch context for an incoming guest,
Singh, Brijesh <=
- [Qemu-devel] [RFC PATCH v1 10/12] target/i386: sev: add support to load incoming encrypted page, Singh, Brijesh, 2019/06/20
- [Qemu-devel] [RFC PATCH v1 03/12] migration/ram: add support to send encrypted pages, Singh, Brijesh, 2019/06/20