|
|
b38b0f |
From 9cf495aabeeaf4fdccae83d748a70936e3bf26ab Mon Sep 17 00:00:00 2001
|
|
|
b38b0f |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
b38b0f |
Date: Mon, 22 Jul 2019 18:22:07 +0100
|
|
|
b38b0f |
Subject: [PATCH 26/39] target/i386: kvm: Delete VMX migration blocker on vCPU
|
|
|
b38b0f |
init failure
|
|
|
b38b0f |
|
|
|
b38b0f |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
b38b0f |
Message-id: <20190722182220.19374-6-pbonzini@redhat.com>
|
|
|
b38b0f |
Patchwork-id: 89624
|
|
|
b38b0f |
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 05/18] target/i386: kvm: Delete VMX migration blocker on vCPU init failure
|
|
|
b38b0f |
Bugzilla: 1689269
|
|
|
b38b0f |
RH-Acked-by: Peter Xu <zhexu@redhat.com>
|
|
|
b38b0f |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
b38b0f |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
b38b0f |
|
|
|
b38b0f |
From: Liran Alon <liran.alon@oracle.com>
|
|
|
b38b0f |
|
|
|
b38b0f |
Commit d98f26073beb ("target/i386: kvm: add VMX migration blocker")
|
|
|
b38b0f |
added migration blocker for vCPU exposed with Intel VMX because QEMU
|
|
|
b38b0f |
doesn't yet contain code to support migration of nested virtualization
|
|
|
b38b0f |
workloads.
|
|
|
b38b0f |
|
|
|
b38b0f |
However, that commit missed adding deletion of the migration blocker in
|
|
|
b38b0f |
case init of vCPU failed. Similar to invtsc_mig_blocker. This commit fix
|
|
|
b38b0f |
that issue.
|
|
|
b38b0f |
|
|
|
b38b0f |
Fixes: d98f26073beb ("target/i386: kvm: add VMX migration blocker")
|
|
|
b38b0f |
Signed-off-by: Liran Alon <liran.alon@oracle.com>
|
|
|
b38b0f |
Reviewed-by: Maran Wilson <maran.wilson@oracle.com>
|
|
|
b38b0f |
Message-Id: <20190619162140.133674-2-liran.alon@oracle.com>
|
|
|
b38b0f |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
b38b0f |
(cherry picked from commit 6b2341eeea43c00b8e266026cec84d57af1484dc)
|
|
|
b38b0f |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
b38b0f |
---
|
|
|
b38b0f |
target/i386/kvm.c | 7 +++++--
|
|
|
b38b0f |
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
b38b0f |
|
|
|
b38b0f |
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
|
|
b38b0f |
index 875412c..8e861a1 100644
|
|
|
b38b0f |
--- a/target/i386/kvm.c
|
|
|
b38b0f |
+++ b/target/i386/kvm.c
|
|
|
b38b0f |
@@ -798,7 +798,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
|
|
b38b0f |
|
|
|
b38b0f |
r = kvm_arch_set_tsc_khz(cs);
|
|
|
b38b0f |
if (r < 0) {
|
|
|
b38b0f |
- goto fail;
|
|
|
b38b0f |
+ return r;
|
|
|
b38b0f |
}
|
|
|
b38b0f |
|
|
|
b38b0f |
/* vcpu's TSC frequency is either specified by user, or following
|
|
|
b38b0f |
@@ -1142,7 +1142,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
|
|
b38b0f |
if (local_err) {
|
|
|
b38b0f |
error_report_err(local_err);
|
|
|
b38b0f |
error_free(invtsc_mig_blocker);
|
|
|
b38b0f |
- return r;
|
|
|
b38b0f |
+ goto fail2;
|
|
|
b38b0f |
}
|
|
|
b38b0f |
/* for savevm */
|
|
|
b38b0f |
vmstate_x86_cpu.unmigratable = 1;
|
|
|
b38b0f |
@@ -1190,6 +1190,9 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
|
|
b38b0f |
|
|
|
b38b0f |
fail:
|
|
|
b38b0f |
migrate_del_blocker(invtsc_mig_blocker);
|
|
|
b38b0f |
+ fail2:
|
|
|
b38b0f |
+ migrate_del_blocker(vmx_mig_blocker);
|
|
|
b38b0f |
+
|
|
|
b38b0f |
return r;
|
|
|
b38b0f |
}
|
|
|
b38b0f |
|
|
|
b38b0f |
--
|
|
|
b38b0f |
1.8.3.1
|
|
|
b38b0f |
|