aboutsummaryrefslogtreecommitdiff
path: root/target/i386
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2018-03-08 06:48:57 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-13 17:36:05 +0100
commit8fa4466d77b44f4f58f3836601f31ca5e401485d (patch)
treec06f36bf174ed9078df4a286dae8f61dd0f30c12 /target/i386
parent5dd0df7e742100d1abf2d6ede42c2ad366da6dc8 (diff)
downloadqemu-8fa4466d77b44f4f58f3836601f31ca5e401485d.zip
qemu-8fa4466d77b44f4f58f3836601f31ca5e401485d.tar.gz
qemu-8fa4466d77b44f4f58f3836601f31ca5e401485d.tar.bz2
sev/i386: add migration blocker
SEV guest migration is not implemented yet. Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386')
-rw-r--r--target/i386/sev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/i386/sev.c b/target/i386/sev.c
index dc8136c..639973c 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -24,11 +24,13 @@
#include "sev_i386.h"
#include "sysemu/sysemu.h"
#include "trace.h"
+#include "migration/blocker.h"
#define DEFAULT_GUEST_POLICY 0x1 /* disable debug */
#define DEFAULT_SEV_DEVICE "/dev/sev"
static SEVState *sev_state;
+static Error *sev_mig_blocker;
static const char *const sev_fw_errlist[] = {
"",
@@ -582,6 +584,7 @@ static void
sev_launch_finish(SEVState *s)
{
int ret, error;
+ Error *local_err = NULL;
trace_kvm_sev_launch_finish();
ret = sev_ioctl(sev_state->sev_fd, KVM_SEV_LAUNCH_FINISH, 0, &error);
@@ -592,6 +595,16 @@ sev_launch_finish(SEVState *s)
}
sev_set_guest_state(SEV_STATE_RUNNING);
+
+ /* add migration blocker */
+ error_setg(&sev_mig_blocker,
+ "SEV: Migration is not implemented");
+ ret = migrate_add_blocker(sev_mig_blocker, &local_err);
+ if (local_err) {
+ error_report_err(local_err);
+ error_free(sev_mig_blocker);
+ exit(1);
+ }
}
static void