summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorLiran Alon2019-06-19 18:21:31 +0200
committerPaolo Bonzini2019-06-21 02:29:39 +0200
commit6b2341eeea43c00b8e266026cec84d57af1484dc (patch)
tree47ec969e71c895602629e25b5edc1273ed1d10d5 /target
parenttarget/i386: define a new MSR based feature word - FEAT_CORE_CAPABILITY (diff)
downloadqemu-6b2341eeea43c00b8e266026cec84d57af1484dc.tar.gz
qemu-6b2341eeea43c00b8e266026cec84d57af1484dc.tar.xz
qemu-6b2341eeea43c00b8e266026cec84d57af1484dc.zip
target/i386: kvm: Delete VMX migration blocker on vCPU init failure
Commit d98f26073beb ("target/i386: kvm: add VMX migration blocker") added migration blocker for vCPU exposed with Intel VMX because QEMU doesn't yet contain code to support migration of nested virtualization workloads. However, that commit missed adding deletion of the migration blocker in case init of vCPU failed. Similar to invtsc_mig_blocker. This commit fix that issue. Fixes: d98f26073beb ("target/i386: kvm: add VMX migration blocker") Signed-off-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Maran Wilson <maran.wilson@oracle.com> Message-Id: <20190619162140.133674-2-liran.alon@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/kvm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 279f99a7f2..c5cbeaddd1 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -1333,7 +1333,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
r = kvm_arch_set_tsc_khz(cs);
if (r < 0) {
- goto fail;
+ return r;
}
/* vcpu's TSC frequency is either specified by user, or following
@@ -1622,7 +1622,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
if (local_err) {
error_report_err(local_err);
error_free(invtsc_mig_blocker);
- return r;
+ goto fail2;
}
}
}
@@ -1673,6 +1673,9 @@ int kvm_arch_init_vcpu(CPUState *cs)
fail:
migrate_del_blocker(invtsc_mig_blocker);
+ fail2:
+ migrate_del_blocker(vmx_mig_blocker);
+
return r;
}