From: Wanpeng Li Date: Wed, 13 Sep 2017 11:04:01 +0000 (-0700) Subject: KVM: X86: Don't block vCPU if there is pending exception X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a5f01f8e9756b40a56e351f98b3fae6d235b834f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git KVM: X86: Don't block vCPU if there is pending exception Don't block vCPU if there is pending exception. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f4a978e36030..bfda79fb102c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -8461,6 +8461,9 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu) if (vcpu->arch.pv.pv_unhalted) return true; + if (vcpu->arch.exception.pending) + return true; + if (kvm_test_request(KVM_REQ_NMI, vcpu) || (vcpu->arch.nmi_pending && kvm_x86_ops->nmi_allowed(vcpu)))