qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] target/i386: kvm: add VMX migration blocker
@ 2018-11-19 18:23 Paolo Bonzini
  2018-11-20 11:44 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 15+ messages in thread
From: Paolo Bonzini @ 2018-11-19 18:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert

Nested VMX does not support live migration yet.  Add a blocker
until that is worked out.

Nested SVM only does not support it, but unfortunately it is
enabled by default for -cpu host so we cannot really disable it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/kvm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index f524e7d929..27dcca5365 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -854,6 +854,7 @@ static int hyperv_init_vcpu(X86CPU *cpu)
 }
 
 static Error *invtsc_mig_blocker;
+static Error *vmx_mig_blocker;
 
 #define KVM_MAX_CPUID_ENTRIES  100
 
@@ -1246,6 +1247,17 @@ int kvm_arch_init_vcpu(CPUState *cs)
                                   !!(c->ecx & CPUID_EXT_SMX);
     }
 
+    if ((env->features[FEAT_1_ECX] & CPUID_EXT_VMX) && !vmx_mig_blocker) {
+        error_setg(&vmx_mig_blocker,
+                   "Nested VMX virtualization does not support live migration yet");
+        r = migrate_add_blocker(vmx_mig_blocker, &local_err);
+        if (local_err) {
+            error_report_err(local_err);
+            error_free(vmx_mig_blocker);
+            return r;
+        }
+    }
+
     if (env->mcg_cap & MCG_LMCE_P) {
         has_msr_mcg_ext_ctl = has_msr_feature_control = true;
     }
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-04-15 11:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-19 18:23 [Qemu-devel] [PATCH v2] target/i386: kvm: add VMX migration blocker Paolo Bonzini
2018-11-20 11:44 ` Dr. David Alan Gilbert
2018-11-20 12:14   ` Paolo Bonzini
2019-04-10 18:26   ` Cole Robinson
2019-04-10 18:26     ` Cole Robinson
2019-04-12  7:47     ` Paolo Bonzini
2019-04-12  7:47       ` Paolo Bonzini
2019-04-12 18:33       ` Cole Robinson
2019-04-12 18:33         ` Cole Robinson
2019-04-13  8:26         ` [Qemu-devel] R: " Paolo Bonzini
2019-04-13  8:26           ` Paolo Bonzini
2019-04-15 11:22           ` Dr. David Alan Gilbert
2019-04-15 11:22             ` Dr. David Alan Gilbert
2019-04-15 11:26             ` Paolo Bonzini
2019-04-15 11:26               ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).