|
|
4ec855 |
From 9a920701b3d2d78612bc454c407cf7b0d01f51c6 Mon Sep 17 00:00:00 2001
|
|
|
4ec855 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
4ec855 |
Date: Mon, 22 Jul 2019 18:22:05 +0100
|
|
|
4ec855 |
Subject: [PATCH 24/39] target/i386: kvm: add VMX migration blocker
|
|
|
4ec855 |
|
|
|
4ec855 |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
4ec855 |
Message-id: <20190722182220.19374-4-pbonzini@redhat.com>
|
|
|
4ec855 |
Patchwork-id: 89621
|
|
|
4ec855 |
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 03/18] target/i386: kvm: add VMX migration blocker
|
|
|
4ec855 |
Bugzilla: 1689269
|
|
|
4ec855 |
RH-Acked-by: Peter Xu <zhexu@redhat.com>
|
|
|
4ec855 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
4ec855 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4ec855 |
|
|
|
4ec855 |
Nested VMX does not support live migration yet. Add a blocker
|
|
|
4ec855 |
until that is worked out.
|
|
|
4ec855 |
|
|
|
4ec855 |
Nested SVM only does not support it, but unfortunately it is
|
|
|
4ec855 |
enabled by default for -cpu host so we cannot really disable it.
|
|
|
4ec855 |
|
|
|
4ec855 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
4ec855 |
(cherry picked from commit d98f26073bebddcd3da0ba1b86c3a34e840c0fb8)
|
|
|
4ec855 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
4ec855 |
---
|
|
|
4ec855 |
target/i386/kvm.c | 12 ++++++++++++
|
|
|
4ec855 |
1 file changed, 12 insertions(+)
|
|
|
4ec855 |
|
|
|
4ec855 |
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
|
|
4ec855 |
index 8a4d31d..d414187 100644
|
|
|
4ec855 |
--- a/target/i386/kvm.c
|
|
|
4ec855 |
+++ b/target/i386/kvm.c
|
|
|
4ec855 |
@@ -772,6 +772,7 @@ static int hyperv_handle_properties(CPUState *cs)
|
|
|
4ec855 |
}
|
|
|
4ec855 |
|
|
|
4ec855 |
static Error *invtsc_mig_blocker;
|
|
|
4ec855 |
+static Error *vmx_mig_blocker;
|
|
|
4ec855 |
|
|
|
4ec855 |
#define KVM_MAX_CPUID_ENTRIES 100
|
|
|
4ec855 |
|
|
|
4ec855 |
@@ -1115,6 +1116,17 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
|
|
4ec855 |
!!(c->ecx & CPUID_EXT_SMX);
|
|
|
4ec855 |
}
|
|
|
4ec855 |
|
|
|
4ec855 |
+ if ((env->features[FEAT_1_ECX] & CPUID_EXT_VMX) && !vmx_mig_blocker) {
|
|
|
4ec855 |
+ error_setg(&vmx_mig_blocker,
|
|
|
4ec855 |
+ "Nested VMX virtualization does not support live migration yet");
|
|
|
4ec855 |
+ r = migrate_add_blocker(vmx_mig_blocker, &local_err);
|
|
|
4ec855 |
+ if (local_err) {
|
|
|
4ec855 |
+ error_report_err(local_err);
|
|
|
4ec855 |
+ error_free(vmx_mig_blocker);
|
|
|
4ec855 |
+ return r;
|
|
|
4ec855 |
+ }
|
|
|
4ec855 |
+ }
|
|
|
4ec855 |
+
|
|
|
4ec855 |
if (env->mcg_cap & MCG_LMCE_P) {
|
|
|
4ec855 |
has_msr_mcg_ext_ctl = has_msr_feature_control = true;
|
|
|
4ec855 |
}
|
|
|
4ec855 |
--
|
|
|
4ec855 |
1.8.3.1
|
|
|
4ec855 |
|