[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 08/14] target/i386: sev: do not create launch con
From: |
Singh, Brijesh |
Subject: |
[Qemu-devel] [PATCH v3 08/14] target/i386: sev: do not create launch context for an incoming guest |
Date: |
Tue, 6 Aug 2019 16:54:52 +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.
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
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 70e9d86815..483d9bb0fa 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -845,10 +845,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 v3 03/14] migration.json: add AMD SEV specific migration parameters, (continued)
[Qemu-devel] [PATCH v3 05/14] hw/machine: add helper to query the memory encryption state, Singh, Brijesh, 2019/08/06
[Qemu-devel] [PATCH v3 02/14] doc: update AMD SEV to include Live migration flow, Singh, Brijesh, 2019/08/06
[Qemu-devel] [PATCH v3 08/14] target/i386: sev: do not create launch context for an incoming guest,
Singh, Brijesh <=
[Qemu-devel] [PATCH v3 07/14] target/i386: sev: provide callback to setup outgoing context, Singh, Brijesh, 2019/08/06
[Qemu-devel] [PATCH v3 06/14] hw/machine: introduce MachineMemoryEncryptionOps for encrypted VMs, Singh, Brijesh, 2019/08/06
[Qemu-devel] [PATCH v3 10/14] target/i386: sev: add support to load incoming encrypted page, Singh, Brijesh, 2019/08/06
[Qemu-devel] [PATCH v3 09/14] target/i386: sev: add support to encrypt the outgoing page, Singh, Brijesh, 2019/08/06
[Qemu-devel] [PATCH v3 13/14] migration/ram: add support to send encrypted pages, Singh, Brijesh, 2019/08/06