From: Gleb Natapov Date: Mon, 22 Sep 2008 11:28:53 +0000 (+0300) Subject: KVM: don't enter guest after SIPI was received by a CPU X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af2152f5457448bd90cb019c108e0a85e716fdbe;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git KVM: don't enter guest after SIPI was received by a CPU The vcpu should process pending SIPI message before entering guest mode again. kvm_arch_vcpu_runnable() returns true if the vcpu is in SIPI state, so we can't call it here. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1b738cb02831..08edeabf15e6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3233,7 +3233,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) r = 1; while (r > 0) { - if (kvm_arch_vcpu_runnable(vcpu)) + if (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE) r = vcpu_enter_guest(vcpu, kvm_run); else { up_read(&vcpu->kvm->slots_lock);