From: Liu, Jinsong <[email protected]> Add 'kvm_vcpu_inited' check so that when adding vcpu it will not cause segmentation fault. This is especially necessary when vpu hotadd after guestos ready.
Signed-off-by: Liu, Jinsong <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]> diff --git a/qemu-kvm.c b/qemu-kvm.c index 09a3076..1c34846 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1618,7 +1618,7 @@ static void kvm_do_load_mpstate(void *_env) void kvm_load_mpstate(CPUState *env) { - if (kvm_enabled() && qemu_system_ready) + if (kvm_enabled() && qemu_system_ready && kvm_vcpu_inited(env)) on_vcpu(env, kvm_do_load_mpstate, env); } -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
